IVZLegendBase.IsDependent

Syntax

IsDependent: Boolean;

Description

The IsDependent property determines dependency of legend from data.

Comments

The property is set to True by default.

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 unit 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;
    BubbleTree: IVZBubbleTree;
    SizeLegend: IVZSizeLegend;
Begin
    Analyzer := UiErAnalyzer1.ErAnalyzer;
    BubbleTree := Analyzer.BubbleTree.BubbleTree;
    // Get size legend
    SizeLegend := BubbleTree.Legends.Item(1As IVZSizeLegend;
    // Set independency from data
    SizeLegend.IsDependent := False;
    // Refresh component. A new size legend will be created on update,
    // because there is no legend bound to data
    Analyzer.BubbleTree.Refresh;
    // Determine binding of independent legend to upper part of report
    SizeLegend.VerticalAlignment := VisualizatorVerticalAlignment.Top;
    // Refresh component
    Analyzer.BubbleTree.Refresh;
End Sub Button1OnClick;

After executing the example the legend with the 1 index 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 change, the independent legend remains the same, but the new legend changes its maximum value.

See also:

IVZLegendBase