Pies: IVZPiesArray;
Pies: Prognoz.Platform.Interop.Visualizators.IVZPiesArray;
The Pies property returns an array of pie factors on the map layer.
To get the array of bar factors on the map layer, use IVZMapChartLayer.Bars.
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 factors
PiesArray := Layer.Pies;
// Get an object for working with pie factors
Pie := PiesArray.Item(0);
// Clear collection of pie factors
PiesArray.Clear;
// Add the previously obtained object for working with pie factors
PiesArray.Add(Pie);
// Refresh and save report
Express.RefreshAll;
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example pie factors appear on the express report map.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Pivot;
Imports Prognoz.Platform.Interop.Visualizators;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Express: IEaxAnalyzer;
Map: IVZMapChart;
Facts: IDimInstance;
Slice: IEaxDataAreaSlice;
Sel: IDimSelection;
Layer: IVZMapChartLayer;
PiesArray: IVZPiesArray;
Pie: VZMapChartPie;
Begin
// Get repository
MB := Params.Metabase;
// 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.emciPieAngle As Integer];
Sel.SelectAll();
// Get map layer
Layer := Map.RootLayer.SubLayers.Item[0];
// Get collection of bar factors
PiesArray := Layer.Pies;
// Get an object for working with pie factors
Pie := PiesArray.Item[0];
// Clear collection of pie factors
PiesArray.Clear();
// Add the previously obtained object for working with pie factors
PiesArray.Add(Pie);
// Refresh and save report
Express.RefreshAll();
(Express As IMetabaseObject).Save();
End Sub;
See also: