IVZLegendBase.ID

Fore syntax

ID: String;

Fore.NET syntax

ID: string;

Description

The ID property determines legend identifier.

Comments

To get object legend, use the IVZLegends.Item property.

Fore example

Executing the example requires that the repository contains an express report with the EXPRESS identifier.

Ad links to the Express, Metabase, Visualizators system assemblies.

Sub UserProc;
Var
    Metabase: IMetabase;
    Analyzer: IEaxAnalyzer;
    BubbleTree: IVZBubbleTree;
    Legend: IVZLegendBase;
Begin
    // Get repository
    Metabase := MetabaseClass.Active;
    // Get express report
    Analyzer := Metabase.ItemById("EXPRESS").Edit As IEaxAnalyzer;
    // Get bubble tree
    BubbleTree := Analyzer.BubbleTree.BubbleTree;
    // Get tree legend
    Legend := BubbleTree.Legends.Item(0);
    Debug.Writeline("Legend identifier: " + Legend.Id);
    // Set a new legend identifier
    Legend.Id := "NewLegendId";
    // Save changes
    (Analyzer As IMetabaseObject).Save;
End Sub UserProc;

After executing the example a new identifier is set to bubble tree legend.

Fore.NET example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Visualizators;

Public Shared Sub Main(Params: StartParams);
Var
    Metabase: IMetabase;
    Analyzer: IEaxAnalyzer;
    BubbleTree: IVZBubbleTree;
    Legend: IVZLegendBase;
Begin
    // Get repository
    Metabase := Params.Metabase;
    // Get express report
    Analyzer := Metabase.ItemById["EXPRESS"].Edit() As IEaxAnalyzer;
    // Get bubble tree
    BubbleTree := Analyzer.BubbleTree.BubbleTree;
    // Get tree legend
    Legend := BubbleTree.Legends.Item[0];
    System.Diagnostics.Debug.WriteLine("Legend identifier: " + Legend.Id);
    // Set a new legend identifier
    Legend.Id := "NewLegendId";
    // Save changes
    (Analyzer As IMetabaseObject).Save();
End Sub;

See also:

IVZLegendBase