IVZMapChartLayer.Pies

Syntax

Pies: IVZPiesArray;

Description

The Pies property returns an array of pie indicators on the map layer.

Comments

To get the array of bar indicators on the map layer, use IVZMapChartLayer.Bars.

Example

Executing the example requires that the repository contains an express report with the EXPRESS identifier containing 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 repository
    MB := MetabaseClass.Active;
    // Get express report
    Express := MB.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    // Get map
    Map := Express.MapChart.MapChart;
    // Set facts 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 an object for working with pie indicators
    Pie := PiesArray.Item(0);
    // Clear collection of pie indicators
    PiesArray.Clear;
    // Add the 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:

IVZMapChartLayer