Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxChartCrosshairOptions.SnapToPointMode Property

Specifies how the Chart control detects target series points for Crosshair Cursor.

#Declaration

Delphi
property SnapToPointMode: TdxChartCrosshairSnapToPointMode read; write; default TdxChartCrosshairSnapToPointMode.Argument;

#Property Value

Type Default Description
TdxChartCrosshairSnapToPointMode Argument

The active snap to series point mode.

#Remarks

Use SnapToPointMode, SnapToSeriesMode, SnapToOutRangePoints, and StickyLines properties to customize crosshair line and label behavior in XY diagrams.

The SnapToPointMode property determines how the Chart control detects target series points for Crosshair Cursor. The SnapToSeriesMode property defines how Crosshair Cursor targets series, and the StickyLines property determines crosshair line behavior.

Note

Crosshair Cursor can target only one point in a series at a time. The SnapToSeriesMode property value defines the number of target series.

#Property Value Examples

The following table demonstrates the difference between all snap to point modes under the same conditions:

Value

Description

Example[1]

Argument (default)

Crosshair Cursor targets a series point near the vertical[2] line that crosses the mouse pointer position within the diagram area.

This mode is compatible with all possible SnapToSeriesMode and StickyLines property values.

Value

Crosshair Cursor targets a series point near the horizontal[2] line that crosses the mouse pointer position within the diagram area.

This mode is compatible with all possible SnapToSeriesMode and StickyLines property values.

NearestToCursor

Crosshair Cursor targets a series point near the mouse pointer position within the diagram area.

The SnapToPointMode property setter updates SnapToSeriesMode and StickyLines property values when you enable the NearestToCursor mode because it is incompatible with single-line point targeting modes.

Refer to the following section for details: Property Setter Behavior.

#Property Setter Behavior

The SnapToPointMode property setter changes SnapToSeriesMode and StickyLines property values as follows if the new SnapToPointMode property value is NearestToCursor:

#Default Value

The SnapToPointMode property’s default value is TdxChartCrosshairSnapToPointMode.Argument.

Footnotes
  1. These examples demonstrate all possible SnapToPointMode property values for the same XY diagram with one visible simple Line series under the following conditions:

  2. Horizontal and vertical crosshair lines swap places if the Rotated property of an XY diagram is set to True.

See Also