XY Chart NET 3 Control Reference
Crosshairs Property

Use this property to return/set values that determines the plot's crosshairs characteristics.  Crosshairs uses the Crosshairs Class set of properties for its characteristics.

Syntax
[Visual Basic]
Property Crosshairs() As C_Crosshairs
[C#]
XYChartNet.XYChartNETCtl.C_Crosshairs XYChartNETCtl.Crosshairs
[C++]
property XYChartNet::XYChartNETCtl::C_Crosshairs ^ XYChartNet::XYChartNETCtl::Crosshairs
       
Remarks
Crosshairs are active whenever the Crosshairs Toolbar button is selected.
Example
' XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

Dim tmpColor As Color

XYChartNETCtl1.Toolbar.Visible = True                     'Display the Toolbar
XYChartNETCtl1.Legend.Visible = True                      'Display the Legend

XYChartNETCtl1.Crosshairs.HorizontalVisible = True        'Display the horizontal crosshair
XYChartNETCtl1.Crosshairs.VerticalVisible = True          'Display the vertical crosshair

tmpColor = XYChartNETCtl1.Crosshairs.Color                'Return the crosshairs color
XYChartNETCtl1.CrossHairs.Color = Color.Green             'Set the crosshairs color to Green
XYChartNETCtl1.CrossHairs.Width = woTwoPoint              'Set the crosshairs width
XYChartNETCtl1.CrossHairs.CoordsVisible = True            'Display the crosshair coordinates along the axis
XYChartNETCtl1.CrossHairs.CoordsBackcolor = Color.Yellow  'Set the coordinates back color to Yellow
XYChartNETCtl1.CrossHairs.YCoordInLegend = True           'Display profile's y-coordinate, based on crosshairs x-value, in legend

XYChartNETCtl1.Refresh                                    'Refresh required to update chart with changes made
// XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

System.Drawing.Color tmpColor;

XYChartNETCtl1.Toolbar.Visible = true;                     //Display the Toolbar
XYChartNETCtl1.Legend.Visible = true;                      //Display the Legend

XYChartNETCtl1.Crosshairs.HorizontalVisible = true;        //Display the horizontal crosshair
XYChartNETCtl1.Crosshairs.VerticalVisible = true;          //Display the vertical crosshair

tmpColor = XYChartNETCtl1.Crosshairs.Color;                //Return the crosshairs color
XYChartNETCtl1.CrossHairs.Color = Color.Green;             //Set the crosshairs color to Green
XYChartNETCtl1.CrossHairs.Width = woTwoPoint;              //Set the crosshairs width
XYChartNETCtl1.CrossHairs.CoordsVisible = true;            //Display the crosshair coordinates along the axis
XYChartNETCtl1.CrossHairs.CoordsBackcolor = Color.Yellow;  //Set the coordinates back color to Yellow
XYChartNETCtl1.CrossHairs.YCoordInLegend = true;           //Display profile's y-coordinate, based on crosshairs x-value, in legend

XYChartNETCtl1.Refresh();                                  //Refresh required to update chart with changes made
// XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

System::Drawing::Color tmpColor;

XYChartNETCtl1->Toolbar->Visible = true;                      //Display the Toolbar
XYChartNETCtl1->Legend->Visible = true;                       //Display the Legend

XYChartNETCtl1->Crosshairs->HorizontalVisible = true;         //Display the horizontal crosshair
XYChartNETCtl1->Crosshairs->VerticalVisible = true;           //Display the vertical crosshair

tmpColor = XYChartNETCtl1->Crosshairs->Color;                 //Return the crosshairs color
XYChartNETCtl1->CrossHairs->Color = Color::Green;             //Set the crosshairs color to Green
XYChartNETCtl1->CrossHairs->Width = woTwoPoint;               //Set the crosshairs width
XYChartNETCtl1->CrossHairs->CoordsVisible = true;             //Display the crosshair coordinates along the axis
XYChartNETCtl1->CrossHairs->CoordsBackcolor = Color::Yellow;  //Set the coordinates back color to Yellow
XYChartNETCtl1->CrossHairs->YCoordInLegend = true;            //Display profile's y-coordinate, based on crosshairs x-value, in legend

XYChartNETCtl1->Refresh();                                    //Refresh required to update chart with changes made
See Also

 

 


© 2003 - 2013 ControlEng Corporation. All rights reserved.