Alignment: VisualizatorBubbleTreeAlignment;
Alignment: Prognoz.Platform.Interop.Visualizators.VisualizatorBubbleTreeAlignment;
The Alignment property determines alignment type for elements in a bubble tree.
Executing the example requires that the repository contains an express report with the EXP identifier. The module containing the example should have links to the Drawing, Express, Metabase and Visualizators system assemblies. This procedure should be called from the Main entry point.
Before executing this example, the bubble tree looks as shown on the IVZBubbleTree interface description page. Set alignment at top border for bubble tree elements, animation time for bubbles (three seconds) and a second level of dimension, according to which data is selected. Select blue color for bubble inner labels and red color for bubble outer labels.
Sub UserProc;
Var
Metabase: IMetabase; // Metabase
Analyzer: IEaxAnalyzer; // Express report
BubbleTree: IVZBubbleTree; // Bubble tree
LabelStyle: IVZLabelStyle; // Label style
Color: IGxColor; // Label color
Begin
// Get metabase object
Metabase := MetabaseClass.Active;
// Get express report object
Analyzer := Metabase.ItemById("EXP").Edit As IEaxAnalyzer;
// Get bubble tree
BubbleTree := Analyzer.BubbleTree.BubbleTree;
// Set alignment at top border for bubble tree bubbles
BubbleTree.Alignment := VisualizatorBubbleTreeAlignment.Top;
// Set animation time to three seconds
BubbleTree.AnimationTime := 3;
// Set new level of dimension according to which data is selected
BubbleTree.Index := 2;
// Set blue color for bubble inner labels
LabelStyle := New VZLabelStyle.Create;
Color := New GxColor.CreateRGB(0, 0, 255);
LabelStyle.FontColor := Color;
BubbleTree.InnerLabelsStyle := LabelStyle;
// Set red color for bubble outer labels
LabelStyle := New VZLabelStyle.Create;
Color := New GxColor.CreateRGB(255, 0, 0);
LabelStyle.FontColor := Color;
BubbleTree.OuterLabelsStyle := LabelStyle;
// Save changes, made in express report
(Analyzer As IMetabaseObject).Save;
End Sub UserProc;
After executing the example, bubble tree elements are aligned at top border, animation time for bubbles is three seconds, the second level of dimension, according to which data is selected, is set, and red color is selected for outer labels of bubble tree bubbles.
Blue color is selected for inner labels of bubbles. To demonstrate this change, click any available bubble of the lowest level:
Executing the example requires that the repository contains an express report with the EXP identifier. The selected procedure is the Main entry point in the Program module of the .NET assembly. The Drawing, Express, Metabase and Visualizators assemblies should be imported to this module from the Prognoz.Platform.Interop system assembly.
Before executing this example, the bubble tree looks as shown on the IVZBubbleTree interface description page. Set alignment at top border for bubble tree elements, animation time for bubbles (three seconds) and a second level of dimension, according to which data is selected. Select blue color for bubble inner labels and red color for bubble outer labels:
Public Shared Sub Main(Params: StartParams);
Var
Metabase: IMetabase; // Metabase
Analyzer: IEaxAnalyzer; // Express report
BubbleTree: IVZBubbleTree; // Bubble tree
LabelStyle: IVZLabelStyle; // Label style
Color: IGxColor; // Label color
Begin
// Get metabase object
Metabase := Params.Metabase;
// Get express report object
Analyzer := Metabase.ItemById["EXP"].Edit() As IEaxAnalyzer;
// Get bubble tree
BubbleTree := Analyzer.BubbleTree.BubbleTree;
// Set alignment at top border for bubble tree bubbles
BubbleTree.Alignment := VisualizatorBubbleTreeAlignment.btaTop;
// Set animation time to three seconds
BubbleTree.AnimationTime := 3;
// Set new level of dimension according to which data is selected
BubbleTree.Index := 2;
// Set blue color for bubble inner labels
LabelStyle := New VZLabelStyle();
Color := New GxColor();
Color.CreateRGB(0, 0, 255);
LabelStyle.FontColor := Color As GxColor;
BubbleTree.InnerLabelsStyle := LabelStyle As VZLabelStyle;
// Set red color for bubble outer labels
LabelStyle := New VZLabelStyle();
Color := New GxColor();
Color.CreateRGB(255, 0, 0);
LabelStyle.FontColor := Color As GxColor;
BubbleTree.OuterLabelsStyle := LabelStyle As VZLabelStyle;
// Save changes, made in express report
(Analyzer As IMetabaseObject).Save();
End Sub;
The result of the executed example is the same as that, executed for Fore language.
See also: