IVZTreeMap.BranchSpacing

Syntax

BranchSpacing: Double;

Description

The BranchSpacing property determines distance between tree map branches.

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. The specified 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

See also:

IVZTreeMap