IChartExternLegendItem.Name

Fore Syntax

Name: String;

Fore.NET Syntax

Name: System.String;

Description

The Name property returns the name of chart external legend element. The property is read-only.

Fore Example

Executing the example requires a regular report with the Report identifier. The report includes the following objects: a chart and an external legend.

Sub UserProc;
Var
    mb: IMetabase;
    rep: IPrxReport;
    legend: IPrxChartLegend;
    chartlegend: IChartExternLegend;
    items: IChartExternLegendItems;
    item: IChartExternLegendItem;
Begin
    mb := MetabaseClass.Active;
    rep := mb.ItemById("OBJ12399").Open(NullAs IPrxReport;
    legend := (rep.ActiveSheet As IprxTable).TabSheet.Objects.Item(1).Extension As IPrxChartLegend;
    chartlegend := legend As IChartExternLegend;
    items := chartlegend.InternalItems;
    item := Items.Item(0);
    Debug.Writeln(item.Name);
End Sub UserProc;

After executing the example the console window displays the name of the first element of external legend.

Fore.NET Example

Executing the example requires a regular report with the Report identifier. The report includes the following objects: a chart and an external legend.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;

...

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    rep: IPrxReport;
    legend: IPrxChartLegend;
    chartlegend: IChartExternLegend;
    items: IChartExternLegendItems;
    item: IChartExternLegendItem;
Begin
    mb := Params.Metabase;
    rep := mb.ItemById["OBJ42859"].Edit() As IPrxReport;
    legend := (rep.ActiveSheet As IprxTable).TabSheet.Objects.Item[1].Extension As IPrxChartLegend;
    chartlegend := legend As IChartExternLegend;
    items := chartlegend.InternalItems;
    item := Items.Item[0];
    System.Diagnostics.Debug.WriteLine(item.Name);
    End Sub;
End Class;

After executing the example the console window displays the name of the first element of external legend.

See also:

IChartExternLegendItem