CellSpacing: IGxSizeF;
CellSpacing: Prognoz.Platform.Interop.Drawing.IGxSizeF;
The CellSpacing property determines horizontal and vertical indents of the elements within the legend with intervals.
To determine visualizer legend area, which contains items, use IVZIntervalsLegend.CellPadding.
Executing the example requires that the repository contains an express report with the EXP identifier. The module containing the example should have links to Express, Drawing, Metabase and Visualizators assemblies. This procedure should be called from the Main entry point.
Before executing the example, the bubble tree legend with intervals looks as shown on the IVZDataScale interface description page. Set a triangular shaped marker, horizontal and vertical indentions of 50 pixels length and align their labels at center with -20 pixels indention for this legend. The elements are to be divided into two columns:
Sub UserProc;
Var
Metabase: IMetabase; // Metabase
EaxAnalyzer: IEaxAnalyzer; // Express report
BubbleTree: IVZBubbleTree; // Bubble tree
Legend: IVZIntervalsLegend;// Scale of legend with intervals
CellSpacing: IGxSizeF; // Indentions between legend elements
Begin
// Get metabase object
Metabase := MetabaseClass.Active;
// Open express report
EaxAnalyzer := Metabase.ItemById("EXP").Edit As IEaxAnalyzer;
// Get bubble tree
BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
// Get legend
Legend := BubbleTree.Legends.Item(0) As IVZIntervalsLegend;
// Set triangular shaped elements of legend
Legend.Marker.Marker := VisualizatorSizeMarkerShape.Trapezoid;
// Set indents between elements of 50 pixels length
CellSpacing := New GxSizeF.Create(50, 50);
Legend.CellSpacing := CellSpacing;
// Set text indent inside element
Legend.TextSpacing := -20;
// Set horizontal alignment of label in the center of element
Legend.TextHorizontalAlignment := GxStringAlignment.Center;
// Divide legend elements into two columns
Legend.ColumnsCount := 2;
// Save changes made in express report
(EaxAnalyzer As IMetabaseObject).Save;
End Sub UserProc;
After executing the example, bubble tree legend elements obtain the triangular shaped marker, horizontal and vertical indents of 50 pixels length. Their labels are aligned at center with -20 pixels indent, and the elements are divided into two columns:
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 Express, Metabase, Drawing and Visualizators assemblies should be imported to this module from the Prognoz.Platform.Interop system assembly.
Before executing the example, the bubble tree legend with intervals looks as shown on the IVZDataScale interface description page. Set a triangular shaped marker, horizontal and vertical indents of 50 pixels length and align their labels at center with -20 pixels indent for this legend. The elements are to be divided into two columns:
Public Shared Sub Main(Params: StartParams);
Var
Metabase: IMetabase; // Metabase
EaxAnalyzer: IEaxAnalyzer; // Express report
BubbleTree: IVZBubbleTree; // Bubble tree
Legend: IVZIntervalsLegend;// Scale of legend with intervals
CellSpacing: GxSizeF; // Indentions between legend elements
Begin
// Get metabase object
Metabase := Params.Metabase;
// Open express report
EaxAnalyzer := Metabase.ItemById["EXP"].Edit() As IEaxAnalyzer;
// Get bubble tree
BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
// Get legend
Legend := BubbleTree.Legends.Item[0] As IVZIntervalsLegend;
// Set triangular shaped elements of legend
Legend.Marker.Marker := VisualizatorSizeMarkerShape.vsmsTrapezoid;
// Set indents between elements of 50 pixels length
CellSpacing := New GxSizeF();
CellSpacing.Create(50, 50);
Legend.CellSpacing := CellSpacing;
// Set text indention inside element
Legend.TextSpacing := -20;
// Set horizontal alignment of label in the center of element
Legend.TextHorizontalAlignment := GxStringAlignment.gsaCenter;
// Divide legend elements into two columns
Legend.ColumnsCount := 2;
// Save changes made in express report
(EaxAnalyzer As IMetabaseObject).Save();
End Sub;
The result of the executed example is the same as that, executed for Fore language.
See also: