IChartSerieBase.DisplayInLegend

Syntax

DisplayInLegend: Boolean;

Description

The DisplayInLegend property determines whether a series is displayed in the legend.

Comments

If this property is set to True, the series is shown in the legend, if the property is set to False, the series is hidden.

The property is set to True by default.

Example

Executing the example requires that the repository contains a regular report with the Report identifier. The chart is on report active sheet. The chart displays at least one series.

To execute this example, add references to the Metabase, Tab, Chart, and Report system assemblies.

Sub UserProc;
Var
    Metabase: IMetabase;
    MetabaseObject: IMetabaseObject;
    Report: IPrxReport;
    Table: IPrxTable;
    Chart: IChart;
Begin
    Metabase := MetabaseClass.Active;
    MetabaseObject := Metabase.ItemById(
"Report").Edit;
    Report := MetabaseObject 
As IPrxReport;
    Table := Report.Sheets.Item(
0As IPrxTable;
    Chart := Table.TabSheet.Objects.Item(
0).Extension As IChart;
    Chart.Series.Item(
0).DisplayInLegend := False;
    Report.MetabaseObject.Save;
End Sub UserProc;

After executing the example, the first series will be hidden in the legend.

See also:

IChartSerieBase