IChartLegend.IsOverlapped

Syntax

IsOverlapped: Boolean;

Description

The IsOverlapped property determines whether a legend is hidden due to lack of space on the chart.

Comments

Available values:

Example

To execute the example, place on the form two Button, ChartBox, and UiErAnalyzer components named BUTTON1 and BUTTON2, CHARTBOX1 and UIERANALYZER1, respectively. For the ChartBox component set the Source property to UiErAnalyzer1. In the Button1 component set the Text property to Hide Legend value, in the Button2 component set the Show Legend value. There should be an express report specified as the Object property for the UiErAnalyzer component.

Add links to the Chart, Express, Forms system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Chart: IChart;
    ChartLegend: IChartLegend;
Begin
    Chart := ChartBox1.Chart;
    ChartLegend := Chart.Legend;
    ChartLegend.IsOverlapped := 
True;
    ChartBox1.Chart.Refresh;
End Sub Button1OnClick;

Sub Button2OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Chart: IChart;
    ChartLegend: IChartLegend;
Begin
    Chart := ChartBox1.Chart;
    ChartLegend := Chart.Legend;
    ChartLegend.IsOverlapped := 
False;
    ChartBox1.Chart.Refresh;
End Sub Button2OnClick;

After clicking the Hide Legend button the legend is hidden because it does not fit the chart area, for example:

After clicking the Show Legend button the legend is not hidden even if it does not fit the chart area, for example:

See also:

IChartLegend