XYDiagram2D.ShowCrosshair(Object, Object, Axis2D, Axis2D, XYDiagramPaneBase) Method
Shows the Crosshair Cursor at the diagram coordinate point related to the specified axes and pane.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v24.2.dll
Declaration
public void ShowCrosshair(
object argument,
object value,
Axis2D axisX = null,
Axis2D axisY = null,
XYDiagramPaneBase pane = null
)
Parameters
Name | Type | Description |
---|---|---|
argument | Object | The argument value. |
value | Object | The value. |
Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
axisX | Axis2D | null | The X-axis by which the argument is measured. |
axisY | Axis2D | null | The Y-axis by which the value is measured. |
pane | XYDiagramPaneBase | null | The pane on which the Crosshair Cursor should be shown. |
Remarks
The following code snippet shows the Crosshair Cursor for the DefaultPane and primary axes.
XYDiagram diagram = (XYDiagram)chartControl1.Diagram;
diagram.ShowCrosshair(new DateTime(2020, 6, 24), 71);
The code snippet below shows the Crosshair Cursor for a specific pane and its axes.
XYDiagram diagram = (XYDiagram)chartControl1.Diagram;
diagram.ShowCrosshair(new DateTime(2020, 6, 24), 71, diagram.SecondaryAxesX[0], diagram.SecondaryAxesY[0], diagram.Panes[0]);
See Also