TdxChartCrosshairOptions.SnapToPointMode Property
Specifies how the Chart control detects target series points for Crosshair Cursor.
Declaration
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. | |
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. | ||
Crosshair Cursor targets a series point near the mouse pointer position within the diagram area. The 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:
- The SnapToSeriesMode property value changes from NearestToFreeLine to NearestToCursor. If the SnapToSeriesMode property is set to any other value, it does not change.
- The StickyLines property value changes from SingleAxis to Crosshair. If the StickyLines property is set to any other value, it does not change.
Default Value
The SnapToPointMode
property’s default value is TdxChartCrosshairSnapToPointMode.Argument.
-
These examples demonstrate all possible
SnapToPointMode
property values for the same XY diagram with one visible simple Line series under the following conditions:- The SnapToSeriesMode property is set to All.
- The StickyLines property is set to Crosshair.
- ArgumentLines.Visible and ValueLines.Visible properties are set to
True
. - The ShowArgumentLabels property is set to
False
.
-
Horizontal and vertical crosshair lines swap places if the Rotated property of an XY diagram is set to
True
.