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).

Syntax
[Visual Basic]
Sub SetCrosshairsPosition(XCrossCoordinate As Double, YCrossCoordinate As Double, XScaleIndex As Integer, YScaleIndex As Integer)
[C#]
void XYChartNETCtl.SetCrosshairsPosition(double XCrossCoordinate, double YCrossCoordinate, int XScaleIndex, int YScaleIndex)
[C++]
void SetCrosshairsPosition(double, double, int, int)
       
Parameters
XCrossCoordinate
Indicates the plot's x-value to set the vertical crosshair at.
YCrossCoordinate
Indicates the plot's y-value to set the horizontal crosshair at.
XScaleIndex
Indicates which x-axis the XCrossCoordinate value pertains to.  Valid range: 0 to NumXScales - 1.
YScaleIndex
Indicates which y-axis the YCrossCoordinate value pertains to.  Valid range: 0 to NumYScales - 1.
Remarks
The crosshairs characteristics are determined by the Crosshairs property.
Example
' 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.SetCrosshairsMode(True)
XYChartNETCtl1.SetCrosshairsPosition(xCrossCoord, yCrossCoord, xScaleIdx, yScaleIdx)
                       
                       
See Also

 

 


© 2003 - 2013 ControlEng Corporation. All rights reserved.