IChartLegend.ColCount

Fore Syntax

ColCount: Integer;

Fore.NET Syntax

ColCount: Integer;

Description

The ColCount property determines the number of columns in a legend.

Comments

Property performance depends on ItemPlacement value.

Fore Example

Executing the example requires a form with the following components on it: Button, ChartBox and UiChart, that have Button1, ChartBox1 and UiChart1 identifiers respectively.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Chart: IChart;
    ChartLegend: IChartLegend;
Begin
    Chart := ChartBox1.Chart;
    ChartLegend := Chart.Legend;
    ChartLegend.ItemPlacement := ChartLegPlacement.CustomColumns;
    ChartLegend.ColCount := 7;
End Sub Button1OnClick;

After executing the example clicking Button1 changes the number of columns in the chart legend.

Fore.NET Example

Executing the example requires a form with the following components placed on this form: Button, ChartBoxNet and UiChartNet, that have respective identifiers Button1, ChartBoxNet1 and UiChartNet1.

Imports Prognoz.Platform.Interop.Chart;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    Chart: IChart;
    ChartLegend: IChartLegend;
Begin
    Chart := ChartBoxNet1.CtrlBox.Chart;
    ChartLegend := Chart.Legend;
    ChartLegend.ItemPlacement := ChartLegPlacement.clpCustomColumns;
    ChartLegend.ColCount := 7;
End Sub;

After executing the example clicking Button1 changes the number of columns in the chart legend.

See also:

IChartLegend