A newer version of this page is available. Switch to the current version.

ChartControl.CrosshairEnabled Property

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

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v18.2.UI.dll

Declaration

public DefaultBoolean CrosshairEnabled { get; set; }
Public Property CrosshairEnabled As DefaultBoolean

Property Value

Type Description
DefaultBoolean

Default - a crosshair cursor's state (enabled/disabled) is automatically determined based on the type of 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 (deactivate) a crosshair cursor at the level of a ChartControl.

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

The following image shows the enabled crosshair cursor with the CrosshairOptions.ShowArgumentLabels, CrosshairOptions.ShowValueLabels, CrosshairOptions.ShowArgumentLine and CrosshairOptions.ShowValueLine set to true.

CrosshairEnabledForChart

As you can see, data point markers are hidden in XtraCharts for Winforms by default, to support highlighting series points. If you wish to display markers on a diagram, set the MarkerVisibility property for a particular series to true (e.g., LineSeriesView.MarkerVisibility).

You can also change the content of a crosshair label via the SeriesBase.CrosshairLabelPattern property.

For more information on how to use a crosshair cursor, see the Crosshair Cursor topic.

See Also