IChartLegend.IsOverlapped

Syntax

IsOverlapped: Boolean;

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, on the form place the Button, ChartBox and UiErAnalyzer components (in the Fore.NET example use the ChartBoxNet and UiErAnalyzerNet components) named BUTTON1 and BUTTON2, CHARTBOX1/CHARTBOXNET1 and UIERANALYZER1/UIERANALYZERNET1 respectively. In the ChartBox/ChartBoxNet component set the Source/UiSource property to UiErAnalyzer1/UiErAnalyzerNet1. 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/UiErAnalyzerNet component.

Add links to the Chart, Forms, Express, Forms.NET (for Fore.NET example) 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;

Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Forms;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    Chart: IChart;
    ChartLegend: IChartLegend;
Begin
    Chart := ChartBoxNet1.CtrlBox.Chart;
    ChartLegend := Chart.Legend;
    ChartLegend.IsOverlapped := 
True;
End Sub;

Private Sub button2_Click(sender: System.Object; e: System.EventArgs);
Var
    Chart: IChart;
    ChartLegend: IChartLegend;
Begin
    Chart := ChartBoxNet1.CtrlBox.Chart;
    ChartLegend := Chart.Legend;
    ChartLegend.IsOverlapped := 
False;
End Sub;

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