IVZBubbleTree.ColorVisual

Syntax

ColorVisual: IVZColorVisual;

Description

The ColorVisual property determines visualizer used for bubble tree data mapping with their children color fill.

Example

Executing the example requires that the repository contains an express report with the EXP identifier. The Color metric should be selected in the bubble tree report. The unit 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 this example, the bubble tree looks as shown on the IVZBubbleTree interface description page. Fill bubbles with different shades of red:

Sub UserProc;
Var
    Metabase: IMetabase;
    EaxAnalyzer: IEaxAnalyzer;
    BubbleTree: IVZBubbleTree;
    ColorVisual: IVZColorVisual;
    ColorMapping: IVZDataSourceMapping;
    Scale: IVZDataScale;
    i: Integer;
    Item: IGxSolidBrush;
    Color: IGxColor;
Begin
    // Get the current repository
    Metabase := MetabaseClass.Active;
    // Get express report
    EaxAnalyzer := Metabase.ItemById("EXP").Edit As IEaxAnalyzer;
    // Get bubble tree
    BubbleTree := EaxAnalyzer.BubbleTree.BubbleTree;
    // Get color visualizer
    ColorVisual := BubbleTree.ColorVisual;
    // Get settings used for data mapping with colors
    ColorMapping := ColorVisual.ColorMapping;
    // Get color scale
    Scale := ColorMapping.Scale;
    // Iterate over all scale elements
    For i := 0 To Scale.ItemsCount - 1 Do
        // Get scale elements
        Item := Scale.Item(i) As IGxSolidBrush;
        // Create red color
        Color := New GxColor.CreateRGB(255 - 40 * i, 00);
        // Set created color for current scale element
        Item.Color := Color;
    End For;
    // Set updated scale
    ColorMapping.Scale := Scale;
    // Save changes, made in express report
    (EaxAnalyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example, bubbles of the selected bubble tree are filled with different shades of red:

See also:

IVZBubbleTree