DisplayInLegend: Boolean;
DisplayInLegend: Boolean;
The DisplayInLegend property determines whether the series is shown in the legend.
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 default value of this property is True.
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(0) As 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 series with 0 index is hidden in the legend. In this example Report stands for identifier of the regular report a sheet of which contains the chart.
To execute this example, add references to the following system assemblies: Metabase, Tab, Chart, and Report.
Sub UserProc(Params: StartParams);
Var
Metabase : IMetabase;
MetabaseObject: IMetabaseObject;
Report: IPrxReport;
Table: IPrxTable;
Chart : IChart;
Begin
Metabase := Params.Metabase;
MetabaseObject := Metabase.ItemById["Report"].Edit();
Report := MetabaseObject As IPrxReport;
Table := Report.Sheets.Item[0] As IPrxTable;
Chart := Table.TabSheet.Objects.Item[0].Extension As IChart;
Chart.Series.Item[0].DisplayInLegend := False;
Report.MetabaseObject.Save();
End Sub;
After executing the example the series with 0 index is hidden in the legend. In this example Report stands for identifier of the regular report a sheet of which contains the chart.
See also: