XY Chart NET 3 Control Reference
SetCrosshairsPosition Method

Use this method to set the crosshairs to a specific x/y location on the chart.   This method is only available in the crosshairs mode (see SetCrosshairsMode).

[Visual Basic]
Sub SetCrosshairsPosition(XCrossCoordinate As Double, YCrossCoordinate As Double, XScaleIndex As Integer, YScaleIndex As Integer)
void XYChartNETCtl.SetCrosshairsPosition(double XCrossCoordinate, double YCrossCoordinate, int XScaleIndex, int YScaleIndex)
void SetCrosshairsPosition(double, double, int, int)
Indicates the plot's x-value to set the vertical crosshair at.
Indicates the plot's y-value to set the horizontal crosshair at.
Indicates which x-axis the XCrossCoordinate value pertains to.  Valid range: 0 to NumXScales - 1.
Indicates which y-axis the YCrossCoordinate value pertains to.  Valid range: 0 to NumYScales - 1.
The crosshairs characteristics are determined by the Crosshairs property.
' XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

Dim xCrossCoord As Double
Dim yCrossCoord As Double
Dim xScaleIdx As Integer
Dim yScaleIdx As Integer

xScaleIdx = 0      'X-axis scale index the crosshair's x-coord will be set against
yScaleIdx = 0      'Y-axis scale index the crosshair's y-coord will be set against
xCrossCoord = 24   'Vertical crosshair position
yCrossCoord = 500  'Horizontal crosshair position

'Position crosshairs; a Refresh call is not required
XYChartNETCtl1.SetCrosshairsPosition(xCrossCoord, yCrossCoord, xScaleIdx, yScaleIdx)
See Also



© 2003 - 2013 ControlEng Corporation. All rights reserved.