IVZLegendBase.IsDependent

Syntax

IsDependent: Boolean;

Description

The IsDependent property determines dependency of legend from data.

Comments

By default the property is set to True.

If the value is False, legend does not depend on data, that is, maximum/minimum values in the legend do not change with changing of visible data. After the main legend is declared as independent, a new main legend is created which is dependent on the selected data.

Example

Executing the example requires that the repository contains an express report with the EXP identifier that contains a bubble tree. The module containing the example should have links to the Express, Metabase and Visualizators system assemblies. There also must be a form containing the following components:

The example is an event handler for the Button1 button:

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
   Analyzer : IEaxAnalyzer;  // Express report
    BubbleTree: IVZBubbleTree; // Bubble tree
    SizeLegend: IVZSizeLegend; // Size legend
Begin
    Analyzer := UiErAnalyzer1.ErAnalyzer;
    BubbleTree := Analyzer.BubbleTree.BubbleTree;   
    //Get size scale
    SizeLegend := BubbleTree.Legends.Item(1As IVZSizeLegend;
    //Set independency on data
    SizeLegend.IsDependent := False;
    //Refresh the component. On the update a new size legend is created,
    // because there is no legend, bound to data
    Analyzer.BubbleTree.Refresh;
    //Determine binding of independent legend to upper part of the report
    SizeLegend.VerticalAlignment := VisualizatorVerticalAlignment.Top;
    //Refresh the component
    Analyzer.BubbleTree.Refresh;
End Sub Button1OnClick;

After executing the example the legend with index 1 becomes independent on the data, after which a new data-dependent legend is automatically created. For improved visualization the independent legend is moved to the upper part of the report.

If maximum values of selected data are further changed, the independent legend remains the same, but the new legend changes its maximum value.

See also:

IVZLegendBase