IChartLegend.AxisIcon

Syntax

AxisIcon: ChartLegendAxisIcon;

Description

The AxisIcon property determines whether an icon indicating which axis (primary or secondary) the series is located on is displayed in the legend. This option is used only when a secondary axis is available in the chart.

Comments

By default this property is set to None.

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;
    Serie: IChartSerie;
Begin
    Chart := ChartBox1.Chart;
    ChartLegend := Chart.Legend;
    Serie := Chart.Series.Item(0);
    Serie.AtSecondaryAxis := True;
    ChartLegend.AxisIcon := ChartLegendAxisIcon.Axis;
    ChartLegend.Alignment := ChartLegendAlignment.Right;
End Sub Button1OnClick;

After executing the example on clicking the Button1 button a secondary axis appears in the chart, and additional icons are shown for legend items indicating if the series belongs to primary or secondary axis. The legend is shown at the right of the chart.

For example:

In the given example the series 0 is located on the additional axis.

See also:

IChartLegend