IChartExternLegendItem.Visible

Syntax

Visible: Boolean;

Description

The Visible property determines whether the chart legend element is displayed.

Comments

The property is set to True by default, and the element is displayed in the external legend. When the property is set to False, the element is hidden.

Example

Executing the example requires a regular report with a chart and an external legend on the report sheet. A unit is added to the report and the UserProc procedure is called from this unit using the hyperlink. The inspector of unit assemblies must contain links to the Chart, Report, Tab system assemblies.

Sub UserProc;
Var
    ChartExLegend: IChartExternLegend;
    Elements: IChartExternLegendItems;
    Element: IChartExternLegendItem;
    i: Integer; 
Begin
    ChartExLegend := (PrxReport.ActiveReport.ActiveSheet As IPrxTable).TabSheet.Objects.Item(1).Extension As IChartExternLegend;
    Elements := ChartExLegend.InternalItems;
    For i := 0 To Elements.Count-1 Do
        Element := Elements.Item(i);
        If Element.Visible=False Then
            Element.Visible := True
        End If;
    End For;
End Sub UserProc;

If the chart legend has hidden elements, they are displayed.

See also:

IChartExternLegendItem