IVZTreeMap.BranchSpacing

Fore Syntax

BranchSpacing: Double;

Fore.NET Syntax

BranchSpacing: System.Double;

Description

The BranchSpacing property determines distance between tree map branches.

Fore Example

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 the example, the tree map looks as shown on the IVZTreeMap interface description page. Set new values for the following properties of the tree map: distance between branches, height of branch titles area, start and end styles of branch titles, maximum and minimum size of text labels font, width of leaf borders, dimension level, according to which data is selected. Also, set new values of properties for alignment and text wrapping of text labels, display the shown level of elements hierarchy, value of mask of tree element text labels, and size of tree map element names collection.

Sub UserProc;
Var
    Metabase: IMetabase; // Metabase
    EaxAnalyzer: IEaxAnalyzer; // Express report
    TreeMap: IVZTreeMap; // Tree map
    Captions: IVZItemsNames; // Collection of tree map element names
    LabelsStyle: IVZLabelStyle; // Text labels style
Begin
    // Get metabase object
    Metabase := MetabaseClass.Active;
    // Get express report object
    EaxAnalyzer := Metabase.ItemById("EXP").Edit As IEaxAnalyzer;
    // Get tree map
    TreeMap := EaxAnalyzer.TreeMap.TreeMap;
    // Set new value of distance between branches
    TreeMap.BranchSpacing := 10;
    // Set new value for height of branch titles area
    TreeMap.CaptionHeight := 50;
    // Set new start style for branch titles
    TreeMap.StartHeaderStyle.FontColor := New GxColor.CreateRGB(02550);
    // Set new end style for branch titles
    TreeMap.EndHeaderStyle.FontColor := New GxColor.CreateRGB(00255);
    // Set maximum and minimum font size of text labels
    TreeMap.MaxFontSize := 14;
    TreeMap.MinFontSize := 12;
    // Set width of leaf borders
    TreeMap.LeafBorderWidth := 5;   
    // Change dimension level, according to which data is selected
    TreeMap.Index := 2;
    // Get text label style
    LabelsStyle := TreeMap.LabelsStyle;
    // Set alignment of text labels
    LabelsStyle.Alignment := GxStringAlignment.Far;
    // Set text wrapping
    LabelsStyle.TextWrapping := VisualizatorTextWrapping.CharWrap;
    // Display shown level of element hierarchy
    Debug.WriteLine("Shown level of element hierarchy: " 
        + TreeMap.HierarchyDepth.ToString);
    // Display text mask of text labels
    Debug.WriteLine("Text mask of text labels: " + LabelsStyle.MaskText);
    // Display size of collection of tree map element names
    If TreeMap.Captions <> Null Then
        Debug.WriteLine("Size of tree map element names collection: " 
            + TreeMap.Captions.Count.ToString); 
    End If;
    // Save express report
    (EaxAnalyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example the following properties of tree map are changed:  distance between branches, height of branch titles area, start and end styles of branch titles, maximum and minimum size of text labels font, width of leaf borders,  dimension level, according to which data is selected. Also, values of properties for alignment and text wrapping of text labels are changed:

The development environment console window displays shown level of item hierarchy, value of text mask of tree map text labels, and size of tree map element names collection:

Shown level of element hierarchy: 3

Text mask of text labels: {%Name}

Size of tree map element names collection: 13

Fore.NET Example

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 tree map looks as shown on the IVZTreeMap interface description page. Set new values for the following properties of the tree map: distance between branches, height of branch titles area, start and end styles of branch titles, maximum and minimum size of text labels font, width of leaf borders, dimension level, according to which data is selected. Also, set new values of properties for alignment and text wrapping of text labels, display the shown level of elements hierarchy, value of mask of tree element text labels, and size of tree map element names collection:

Public Shared Sub Main(Params: StartParams);
Var
    Metabase: IMetabase; // Metabase
    EaxAnalyzer: IEaxAnalyzer; // Express report
    TreeMap: IVZTreeMap; // Tree map
    Captions: IVZItemsNames; // Collection of tree map element names
    LabelsStyle: IVZLabelStyle; // Text labels style
    StartColor: GxColor; // Color of elements of titles start style
    EndColor: GxColor; // Color of elements of titles end style
Begin
    // Get metabase object
    Metabase := Params.Metabase;
    // Get express report object
    EaxAnalyzer := Metabase.ItemById["EXP"].Edit() As IEaxAnalyzer;
    // Get tree map
    TreeMap := EaxAnalyzer.TreeMap.TreeMap;
    // Set new value of distance between branches
    TreeMap.BranchSpacing := 10;
    // Set new value for height of branch titles area
    TreeMap.CaptionHeight := 50;
    // Set new start style for branch titles
    StartColor := New GxColor();
    StartColor.CreateRGB(02550);
    TreeMap.StartHeaderStyle.FontColor := StartColor;
    // Set new end style for branch titles
    EndColor := New GxColor();
    EndColor.CreateRGB(00255);
    TreeMap.EndHeaderStyle.FontColor := EndColor;
    // Set maximum and minimum font size of text labels
    TreeMap.MaxFontSize := 14;
    TreeMap.MinFontSize := 12;
    // Set width of leaf borders
    TreeMap.LeafBorderWidth := 5;   
    // Change dimension level, according to which data is selected
    TreeMap.Index := 2;
    // Get text label style
    LabelsStyle := TreeMap.LabelsStyle;
    // Set alignment of text labels
    LabelsStyle.Alignment := GxStringAlignment.gsaFar;
    // Set text wrapping
    LabelsStyle.TextWrapping := VisualizatorTextWrapping.vtwCharWrap;
    // Display shown level of element hierarchy
    System.Diagnostics.Debug.WriteLine("Shown level of element hierarchy: " 
        + TreeMap.HierarchyDepth.ToString());
    // Display text mask of text labels
    System.Diagnostics.Debug.WriteLine("Text mask of text labels: " + LabelsStyle.MaskText);
    // Display size of collection of tree map element names
    If TreeMap.Captions <> Null Then
        System.Diagnostics.Debug.WriteLine("Size of tree map element names collection: "
            + TreeMap.Captions.Count.ToString());   
    End If
    // Save 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:

IVZTreeMap