Click or drag to resize

IChartDataPoint Index Property

Gets index of the point in the points collection.
Examples
The following code illustrates how to access the Index of a IChartDataPoint in the IChartDataPoints collection:
<para>//Create worksheet</para><para>Workbook workbook = new Workbook();</para><para>workbook.LoadFromFile("Sample.xlsx");</para><para>Worksheet worksheet = workbook.Worksheets[0];</para><para>//Create chart and set range</para><para>Chart chart = worksheet.Charts.Add();</para><para>chart.DataRange = worksheet.Range["A1:C2"];</para><para>//Set serie</para><para>IChartSerie serie = chart.Series[0];</para><para>//Get index</para><para>Console.WriteLine(serie.DataPoints[0].Index);</para>

Namespace: Spire.Xls.Core
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
int Index { get; }

Property Value

Type: Int32
See Also