Skip to main content

ChartControl.CrosshairEnabled Property

Gets or sets a value that specifies whether or not a crosshair cursor is enabled for a chart.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v14.2.dll

#Declaration

[NonTestableProperty]
[XtraSerializableProperty]
public bool? CrosshairEnabled { get; set; }

#Property Value

Type Description
Nullable<Boolean>

Null - a crosshair cursor's state (enabled/disabled) is automatically determined according to the type of a diagram currently displayed on a chart; True - a crosshair cursor is enabled for a chart; False - a crosshair cursor is disabled.

#Remarks

Use the CrosshairEnabled property to activate (disactivate) a crosshair cursor at the level of a ChartControl.

After that, it becomes possible to customize a crosshair cursor appearance and position on a diagram via the ChartControl.CrosshairOptions property.

You can also change the content of a crosshair label, via the XYSeries2D.CrosshairLabelPattern property and crosshair label appearance using the XYSeries2D.CrosshairLabelTemplate property.

The following table shows this property in action.

CrosshairEnabled=True CrosshairEnabled=False
ChartControl - CrosshairEnabled - True ChartControl - CrosshairEnabled - False
NOTE

The CrosshairOptions.ShowCrosshairLabels and CrosshairOptions.ShowArgumentLine properties are enabled by default.

To show series point markers on a diagram, set the MarkerVisible property for a particular series to true (e.g., LineSeries2D.MarkerVisible).

To learn more about the crosshair cursor, see the Crosshair Cursor topic.

See Also