HitTestResult.PointIndex 属性

定义

获取或设置命中测试返回的数据点(如果有)的索引。Gets or sets the index of a data point, if any, returned by a hit test.

public:
 property int PointIndex { int get(); void set(int value); };
public int PointIndex { get; set; }
member this.PointIndex : int with get, set
Public Property PointIndex As Integer

属性值

Int32

一个 integer 值,该值表示命中测试返回的数据点的索引。An integer value that represents the index of a data point returned by a hit test. 默认值为 -1。The default value is negative one (-1).

注解

如果数据点位于命中测试所检查的位置,则该 PointIndex 属性将返回该数据点的从零开始的索引,否则将返回一个 ( 为1的负) 。If a data point is at the location that is checked by a hit test, the PointIndex property will return the zero-based index of that data point, otherwise it will return a negative one (-1).

所有数据点都存储在中 DataPointCollection ,后者将公开为 Points 对象的集合属性 Series ; 的索引 DataPointCollection 是从零开始的。All data points are stored in a DataPointCollection, which is exposed as the Points collection property of a Series object; the index of the DataPointCollection is zero-based.

使用 Series 属性可确定数据点所属的序列。Use the Series property to determine the series to which the data point belongs.

适用于