AxisIcon: ChartLegendAxisIcon;
AxisIcon: Prognoz.Platform.Interop.Chart.ChartLegebdAxisIcon;
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.
By default this property is set to None.
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.
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.
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Chart: IChart;
ChartLegend: IChartLegend;
Serie: IChartSerie;
Begin
Chart := ChartBoxNet1.CtrlBox.Chart;
ChartLegend := Chart.Legend;
Serie := Chart.Series.Item[0];
Serie.AtSecondaryAxis := True;
ChartLegend.AxisIcon := ChartLegendAxisIcon.claiAxis;
ChartLegend.Alignment := ChartLegendAlignment.clalRight;
End Sub;
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.
See also: