Object Reference > ChartGroup Object > ChartGroup Object Methods > CoordToDataIndex Method (ChartGroup) |
CoordToDataIndex Method (ChartGroup)
Picks the displayed data closest to the given pixel coordinate. Returns a value indicating the chart region in which the coordinate is found. See Region Constants for valid values. For Scatter Plot charts, mouse selection of individual legend entries is detected using the pick functionality -- the “Row” parameter of CoordToDataIndex is set to the corresponding series when an entry is picked inside the legend.
Function CoordToDataIndex(XPixel As Long, YPixel As Long, Row As Long, Column As Long, Distance As Long) As RegionConstants
Part |
Type |
Description |
Xpixel |
Long |
X pixel coordinate |
Ypixel |
Long |
Y pixel coordinate |
Row |
Long |
row in which displayed data appears |
Column |
Long |
column in which displayed data appears |
Distance |
Long |
distance from data to coordinate |
See Also