Gets the index of this ChartElement in the array with data used by the chart series it belongs to.
Namespace: MindFusion.Charting
Assembly: MindFusion.Charting
C#
![]() |
---|
public int DataIndex { get; } |
Visual Basic
![]() |
---|
Public ReadOnly Property DataIndex As Integer |
An integer value. Default is -1.
The DataIndex gives you the position of the chart element in the data array for its series. In a single bar chart, if you click on the second bar DataIndex will be 1. If the chart has multiple series, drawn in clusters or stacked, the DataIndex will give you the index of the data value of the clicked bar.