The requested page is not available for the requested platform. You are viewing the content for Default platform.

WebChartControl.CrosshairEnabled Property

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

Namespace: DevExpress.XtraCharts.Web

Assembly: DevExpress.XtraCharts.v19.2.Web.dll

Declaration

[DefaultValue(DefaultBoolean.Default)]
public DefaultBoolean CrosshairEnabled { get; set; }
<DefaultValue(DefaultBoolean.Default)>
Public Property CrosshairEnabled As DefaultBoolean

Property Value

Type Default Description
DefaultBoolean

Default

Default - 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 (deactivate) a crosshair cursor at the level of a chart.

After that, it becomes possible to customize the crosshair cursor's appearance and position on a diagram via the WebChartControl.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

You can also change the content of crosshair labels, via the Axis2D.CrosshairLabelPattern and SeriesBase.CrosshairLabelPattern properties.

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

Examples

This example shows how to enable the Crosshair Cursor and configure its settings.

The following API members are used:

Member Description
WebChartControl.CrosshairEnabled Gets or sets the value that specifies whether the Crosshair Cursor is enabled for a chart.
CrosshairOptions.ContentShowMode Gets or sets the element that displays the Crosshair's content.
CrosshairOptions.ShowValueLabels Gets or sets the value that specifies whether to show a value label for a series point the Crosshair Cursor highlights.
CrosshairOptions.ShowValueLine Specifies whether to show a value line for a series point the Crosshair Cursor highlights.
CrosshairOptions.CrosshairLabelMode Specifies the value that defines how to show the Crosshair Cursor's label for a series.
webChartControl.CrosshairEnabled = DevExpress.Utils.DefaultBoolean.True;
webChartControl.CrosshairOptions.ContentShowMode = CrosshairContentShowMode.Label;
webChartControl.CrosshairOptions.CrosshairLabelMode = CrosshairLabelMode.ShowForNearestSeries;
webChartControl.CrosshairOptions.ShowArgumentLabels = true;
webChartControl.CrosshairOptions.ShowArgumentLine = true;
webChartControl.CrosshairOptions.ShowValueLabels = true;
webChartControl.CrosshairOptions.ShowValueLine = true;
See Also