RelativeIndexOf(Serie: IChartSerie): Integer;
RelativeIndexOf[Serie: IChartSerie]: Integer;
Serie. Series, which index must be obtained in a relative series group.
The RelativeIndexOf property returns the index of the specified series in a relative series group, which includes it.
A relative group is formed by summation of series values. In this case the summary chart looks as follows:
Executing the example requires a form with the UiChart, ChartBox and Button components on the form with the UiChart1, ChartBox1 and Button1 identifiers respectively. The UiChart1 component must be a data source for the ChartBox1 component with the Mixed chart type. The hyperlinks mode must also be set for the chart.
Sub ChartBox1OnSerieClick(Sender: Object; Args: IChartSerieClickEventArgs);
Var
Chart: IChart;
Begin
Chart := ChartBox1.Chart;
Debug.WriteLine(Chart.StyleGroup.RelativeIndexOf(Chart.Series.Item(Args.SerieIndex)).ToString);
End Sub ChartBox1OnSerieClick;
After executing the example on clicking the specified series of the chart the index of this series in a relative series group, to which it belongs, is displayed in the console.
Executing the example requires a form with the UiChartNet, ChartBoxNet and Button components on the form with the UiChartNet1, ChartBoxNet1 and Button1 identifiers respectively. The UiChartNet1 component must be a data source for the ChartBoxNet1 component with the Mixed scale type. The hyperlinks mode must also be set for the chart.
Imports Prognoz.Platform.Interop.Chart;
Private Sub chartBoxNet1_OnSerieClick(Sender: System.Object; Args: Prognoz.Platform.Interop.Chart.ChartSerieClickEventArgs);
Var
Chart: IChart;
Begin
Chart := ChartBoxNet1.CtrlBox.Chart;
System.Diagnostics.Debug.WriteLine(Chart.StyleGroup.RelativeIndexOf[Chart.Series.Item[Args.SerieIndex]].ToString());
End Sub;
After executing the example on clicking the specified chart series the index of this series in a relative series group, to which it belongs, is displayed in the console.
See also: