Bubbles: IVZBubblesArray;
Bubbles: Prognoz.Platform.Interop.Visualizators.IVZBubblesArray;
The Bubbles property determines array of bubble factors for the map layer.
Bubble factor enables the user to display additional information about territories, for example, correlation of factor values.
To enable this type of factors, use the registry setting: HKEY_CURRENT_USER\Software\Foresight\Prognoz\9.0\Visualizers\MapChart\EnableBubbleIndicator =1. If the MapChart end section and the DWORD (32 bit) parameter EnableBubbleIndicator =1 are missing in the registry, create them manually.
Working with bubble factors is made similarly to pie factors.
Example of map with bubble factors:
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;
BubblesArray: IVZBubblesArray;
Bubble: IVZMapChartBubble;
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 Bubble Color metric type and add all elements to selection
Sel := Express.MapChart.IndicatorSelection(EaxMapChartIndicators.BubbleColor);
Sel.SelectAll;
// Get map layer
Layer := Map.RootLayer.SubLayers.Item(0);
// Get collection of bubble factors
BubblesArray := Layer.Bubbles;
// Get an object for working with bubble factors
Bubble := BubblesArray.Item(0);
// Clear collection of bubble factors
BubblesArray.Clear;
// Add the previously obtained object for working with bubble factors
BubblesArray.Add(Bubble);
// Refresh and save report
Express.RefreshAll;
(Express As IMetabaseObject).Save;
End Sub UserProc;
After executing the example bubble 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;
BubblesArray: IVZBubblesArray;
Bubble: VZMapChartBubble;
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 Bubble Color metric type and add all elements to selection
Sel := Express.MapChart.IndicatorSelection[EaxMapChartIndicators.emciBubbleColor As Integer];
Sel.SelectAll();
// Get map layer
Layer := Map.RootLayer.SubLayers.Item[0];
// Get collection of bubble factors
BubblesArray := Layer.Bubbles;
// Get an object for working with bubble factors
Bubble := BubblesArray.Item[0];
// Clear collection of bubble factors
BubblesArray.Clear();
// Add the previously obtained object for working with bubble factors
BubblesArray.Add(Bubble);
// Refresh and save report
Express.RefreshAll();
(Express As IMetabaseObject).Save();
End Sub;
See also: