Use this method to set the crosshairs to a specific x/y location on the chart.

The parameters required for this method are described below.



XCrossCoordinate Indicates the plot's x-value to set the vertical crosshair at.  Value is of type Double.
YCrossCoordinate Indicates the plot's y-value to set the horizontal crosshair at. Value is of type Double.
XScaleIndex Indicates which x-axis the XCrossCoordinate value pertains to.  Valid range: 1 to NumXScales.   Value is of type Integer.
YScaleIndex Indicates which y-axis the YCrossCoordinate value pertains to.  Valid range:  1 to NumYScales.  Value is of type Integer.

NOTE:  The crosshairs characteristics are determined by the Crosshairs property.



Dim xCrossCoord As Double

Dim yCrossCoord As Double

Dim xScaleIdx As Integer

Dim yScaleIdx As Integer


xScaleIdx = 1        'X-Scale index the crosshair's x-coordinate will be set against

yScaleIdx = 1        'Y-Scale index the crosshair's y-coordinate will be set against

xCrossCoord = 24     'Vertical crosshair position

yCrossCoord = 500    'Horizontal crosshair position

XYChartCtrl.SetCrosshairsPosition xCrossCoord, yCrossCoord, xScaleIdx, yScaleIdx  'Position crosshairs; a Refresh call is not required 


See Also

Methods     SetCrosshairs     Crosshairs