Skip to main content
All docs
V25.1
  • 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.

    VCL Chart Control: Snap by Argument Mode

    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.

    VCL Chart Control: Snap By Value Mode

    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.

    VCL Chart Control: Snap to the Nearest Series Point Mode

    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