Programming User Interaction > Returning Coordinate Values > Determining Coordinate Values |
To determine the pixel coordinates of a given data point, call DataIndexToCoord. For example, the following code obtains the pixel coordinates of the point in the second row and third column:
Dim PixelX As Long
Dim PixelY As Long
With Chart2D1.ChartGroups(1)
.DataIndexToCoord 2, 3, PixelX, PixelY
End With
' PixelX and PixelY now contain the pixel coordinate value