Object Reference > ChartGroup Object > ChartGroup Object Methods > CoordToDataIndexObject Method (ChartGroup) |
CoordToDataIndexObject Method (ChartGroup)
Picks the displayed data closest to the given pixel coordinate.
Function CoordToDataIndexObject(XPixel As Long, YPixel As Long, Focus As Integer) As Chart2DDataIndexResult
This method is similar to CoordToDataIndex, except that the Chart2DDataIndexResult object is returned with the Series, Point and Distance values that indicate the chart region in which the coordinate is found. This method should be used if passing parameters by reference is not allowed in your development environment (such as VBScript).
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. |
See Also