Object Reference > ChartGroup Object > ChartGroup Object Methods > CoordToDataIndex Method (ChartGroup) |
CoordToDataIndex Method (ChartGroup)
Picks the displayed data closest to the given pixel coordinate.
Function CoordToDataIndex(XPixel As Long, YPixel As Long, Focus As FocusConstants, Series As Long, Point As Long, Distance As Long) As RegionConstants
Returns a value indicating the chart region in which the coordinate is found.
Part |
Type |
Description |
Xpixel |
Long |
X pixel coordinate |
Ypixel |
Long |
Y pixel coordinate |
Focus |
Integer |
How the closest series and point is determined. See Focus Constants for valid values. |
Series |
Long |
Returned nearest series |
Point |
Long |
Returned nearest point |
Distance |
Long |
Distance between pixel coordinate and closest displayed data |
See Also