IVZBaseDataVisualizer.Background

Syntax

Background: IGxBrush;

Description

The Background property determines brush settings for visualizer background.

Comments

To get an object for visualizer data formatting, use IVZBaseDataVisualizer.Formatter.

Example

Executing the example requires:

Add links to the Drawing, Express, Metabase, Visualizators system assemblies.

Sub UserProc;
Var
    Metabase: IMetabase;
    Analyzer: IEaxAnalyzer;
    BubbleTree: IVZBaseDataVisualizer;
    Formatter: IVZBaseFormatter;
    Color: IGxColor;
    Brush: IGxBrush;
    Bitmap: IGxBitmap;
    Image: IGxImage;
    Graphics: IGxGraphics;
    Rect: IGxRectF;
    UnRed: IUndoRedo;
Begin
    // Get repository
    Metabase := MetabaseClass.Active;
    // Get express report
    Analyzer := Metabase.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    // Get bubble tree
    BubbleTree := Analyzer.BubbleTree.BubbleTree As IVZBaseDataVisualizer;
    // Change settings of visualizer background brush
    Color := GxColor.FromName("Yellow");
    Brush := New GxSolidBrush.Create(Color);
    BubbleTree.Background := Brush;
    // Get percentage of the 0.425 number by means of tool for data formatting
    Formatter := BubbleTree.Formatter;
    Formatter.FormatByParam("{0}"0.425"0.00%");
    Debug.WriteLine("The 0.425 number expressed in percents: " + Formatter.FormatByParam("{0}"0.425"0.00%"));
    // Enable visualizer animation
    If Not BubbleTree.EnableAnimating Then
        BubbleTree.EnableAnimating := True;
    End If;
    // Disable visualizer print mode
    If BubbleTree.IsPrintMode Then
        BubbleTree.IsPrintMode := False;
    End If;
    // There are no changes in visualizer
    If BubbleTree.IsDirty Then
        BubbleTree.IsDirty := False;
    End If;
    
// Get undo/redo stack of visualizer settings
    UnRed := BubbleTree.UndoRedo;
    
// Set availability and number of stack changes
    UnRed.Enabled:= True;
    UnRed.Limit:= 
5;
    
// Save visualizer image to file
    Bitmap := BubbleTree.GetBitmap(17951205300);
    Bitmap.SaveToFile("C:\Image.jpg");
    // Render visualizer to graphic object
    Image := New GxImage.CreateFromFile("C:\Graph.jpg");
    Graphics := GxGraphicsClass.FromImage(Image);
    Rect := New GxRectF.Create(100100100100);
    BubbleTree.Draw(Graphics, Rect, 300True);
    // Refresh report and save changes
    Analyzer.RefreshAll;
    (Analyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example for bubble tree:

See also:

IVZBaseDataVisualizer