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. For the Button1 component set the Text property to Hide Legend, for the Button2 component - Show Legend. 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;

Clicking the Hide Legend button hides the legend because there is not enough space for it on the chart, for example:

Clicking the Show Legend button does not hide the legend even if there is no enough space for it on the chart, for example:

See also:

IChartLegend