Pies: IVZPiesArray;
The Pies property returns an array of pie indicators on the map layer.
To get the array of bar indicators on the map layer, use IVZMapChartLayer.Bars.
Executing the example requires that the repository contains an express report with the EXPRESS identifier with a map. Facts dimension has the 10124 key.
Add links to the Dimensions, Express, Metabase, Pivot, Visualizators system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Map: IVZMapChart;
Facts: IDimInstance;
Slice: IEaxDataAreaSlice;
Sel: IDimSelection;
Layer: IVZMapChartLayer;
PiesArray: IVZPiesArray;
Pie: IVZMapChartPie;
Begin
// Get the current repository
MB := MetabaseClass.Active;
// Get express report
Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get map
Map := Express.MapChart.MapChart;
// Set fact dimension as a metrics dimension
Facts := Express.Pivot.Dimensions.FindByKey(10124).DimInstance;
Slice := Express.DataArea.Slices.Item(0);
Slice.IndicatorsDimension := Facts;
// Enable the Pie metric type and add all elements to selection
Sel := Express.MapChart.IndicatorSelection(EaxMapChartIndicators.PieAngle);
Sel.SelectAll;
// Get map layer
Layer := Map.RootLayer.SubLayers.Item(0);
// Get collection of bar indicators
PiesArray := Layer.Pies;
// Get object for working with pie indicators
Pie := PiesArray.Item(0);
// Clear the collection of pie indicators
PiesArray.Clear;
// Add previously obtained object for working with pie indicators
PiesArray.Add(Pie);
// Refresh and save report
Express.RefreshAll;
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example pie indicators appear on the express report map.
See also: