This event is generated whenever the user is in the crosshairs
mode (see Toolbar) and the user moves
the mouse cursor over the XY Chart plot area. Use this event to obtain the crosshairs’ corresponding X
and/or Y coordinates.
Example
'XYChartCtl1 is the name of the XY Chart control instance placed on the form
'This example will display each scale coordinate value in its own label control
Private Sub
XYChartCtl1_CrossHairsMove()
X1Label.Caption =
XYChartCtl1.XCoordinate(1)
'Display
x-coordinate of the first X-axis in label X1Label
X2Label.Caption =
XYChartCtl1.XCoordinate(2)
'Display
x-coordinate of the second X-axis in label X2Label
Y1Label.Caption =
XYChartCtl1.YCoordinate(1) 'Display
y-coordinate of the first Y-axis in label Y1Label
Y2Label.Caption = XYChartCtl1.YCoordinate(2) 'Display y-coordinate of the second Y-axis in label Y2Label
Y3Label.Caption = XYChartCtl1.YCoordinate(3) 'Display
y-coordinate of the third Y-axis in label Y3Label
Y4Label.Caption =
XYChartCtl1.YCoordinate(4) 'Display
y-coordinate of the fourth Y-axis in label Y4Label
Y5Label.Caption =
XYChartCtl1.YCoordinate(5) 'Display
y-coordinate of the fifth Y-axis in label Y5Label
End Sub
See
Also
Events CrossHairsSelected CrossHairsNotSelected CrossHairsLeave
XCoordinate YCoordinate