menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ChartInteractiveCursor - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ChartInteractiveCursor

    This type implements the cursor service which lets the end user drag a set of horizontal and vertical lines and dock them to a data point to help visualize the X and Y values of these data points.

    Inheritance
    System.Object
    ChartInteractiveCursor
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms.Chart
    Assembly: Syncfusion.Chart.Base.dll
    Syntax
    public sealed class ChartInteractiveCursor

    Constructors

    ChartInteractiveCursor(ChartSeries)

    Initializes a new instance of the ChartInteractiveCursor class.

    Declaration
    public ChartInteractiveCursor(ChartSeries chartSeries)
    Parameters
    Type Name Description
    ChartSeries chartSeries

    Specifies the chart series data points that the cursor should track.

    ChartInteractiveCursor(ChartSeries, Color)

    Initializes a new instance of the ChartInteractiveCursor class.

    Declaration
    public ChartInteractiveCursor(ChartSeries chartSeries, Color color)
    Parameters
    Type Name Description
    ChartSeries chartSeries

    Specifies the chart series data points that the cursor should track.

    System.Drawing.Color color

    The color of the cursors.

    Properties

    Color

    Gets or sets the color.

    Declaration
    public Color Color { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    The color.

    CursorOrientation

    Gets or Sets the Cursor Orientation of the Interactive Cursor.

    Declaration
    public InteractiveCursorOrientation CursorOrientation { get; set; }
    Property Value
    Type Description
    InteractiveCursorOrientation

    Cursor Orientation

    HorizontalCursorColor

    Gets or Sets the Horizontal cursor color of the Interactive Cursor.

    Declaration
    public Color HorizontalCursorColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    Horizontal cursor color

    LineLocation

    Gets or Sets the CursorLineLocation.

    Declaration
    public PointF LineLocation { get; set; }
    Property Value
    Type Description
    System.Drawing.PointF

    The CursorLine location.

    LineRedraw

    Gets or Sets whether the cursor line need to LineRedraw or not.

    Declaration
    public bool LineRedraw { get; set; }
    Property Value
    Type Description
    System.Boolean

    The LineRedraw

    Location

    Gets the location of Interactive Cursor.

    Declaration
    public PointF Location { get; }
    Property Value
    Type Description
    System.Drawing.PointF

    The location.

    MoveToChartArea

    Gets or Sets the cursor moving to chart area.

    Declaration
    public bool MoveToChartArea { get; set; }
    Property Value
    Type Description
    System.Boolean

    The move to chart area

    Point

    Gets the point.

    Declaration
    public ChartPoint Point { get; }
    Property Value
    Type Description
    ChartPoint

    The point.

    Series

    Gets the series.

    Declaration
    public ChartSeries Series { get; }
    Property Value
    Type Description
    ChartSeries

    The series.

    ShowPointSymbol

    Gets and Sets the symbol for series points.

    Declaration
    public bool ShowPointSymbol { get; set; }
    Property Value
    Type Description
    System.Boolean

    ShowPointSymbol

    SnapToPoints

    Gets or Sets whether interactive cursor will be placed in chart area or closest point after releasing the mouse.

    Declaration
    public bool SnapToPoints { get; set; }
    Property Value
    Type Description
    System.Boolean

    Snap to a point in series

    VerticalCursorColor

    Gets or Sets the Vertical cursor color of the Interactive Cursor.

    Declaration
    public Color VerticalCursorColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    Vertical cursor color

    XInterval

    Gets and Sets the X inetrval.

    Declaration
    public double XInterval { get; set; }
    Property Value
    Type Description
    System.Double

    Interval for X Axis

    XPosition

    Gets or sets the X position.

    Declaration
    public int XPosition { get; set; }
    Property Value
    Type Description
    System.Int32

    The X position.

    YInterval

    Gets and Sets the Y inetrval.

    Declaration
    public double YInterval { get; set; }
    Property Value
    Type Description
    System.Double

    Interval for Y Axis

    YPosition

    Gets or sets the Y position of the Interactive Cursor.

    Declaration
    public int YPosition { get; set; }
    Property Value
    Type Description
    System.Int32

    The Y position.

    Methods

    GetClosestXPoint(Double)

    Returns the closest X point for the given Y value.

    Declaration
    public int GetClosestXPoint(double x)
    Parameters
    Type Name Description
    System.Double x

    Specifies the X value in the chart near which the data point is to be found.

    Returns
    Type Description
    System.Int32

    The series index of the data point or -1 if nothing is nearby.

    GetClosestYPoint(Double)

    Returns the closest Y point for the given Y value.

    Declaration
    public int GetClosestYPoint(double y)
    Parameters
    Type Name Description
    System.Double y

    Specifies the Y value in the chart near which the data point is to be found.

    Returns
    Type Description
    System.Int32

    The series index of the data point or -1 if nothing is nearby.

    HorizontalMove(Boolean)

    Call this method to move the vertical cursor left or right, to the next nearest data point in X axis.

    Declaration
    public void HorizontalMove(bool moveRight)
    Parameters
    Type Name Description
    System.Boolean moveRight

    True to move right, false to move left.

    HorizontalMove(Double)

    Returns the series index value of the closest point to the specified x value and moves the cursor to that point. If closest point could not be found, -1 is returned.

    Declaration
    public int HorizontalMove(double x)
    Parameters
    Type Name Description
    System.Double x

    Specifies the X value in the chart near which the data point is to be found.

    Returns
    Type Description
    System.Int32

    The series index of the data point or -1 if nothing is nearby.

    IsXLocation(Point)

    Specifies if the absolute difference in X position of the specified point and the current location of the cursor is less than 3.

    Declaration
    public bool IsXLocation(Point pt)
    Parameters
    Type Name Description
    System.Drawing.Point pt

    The point in question.

    Returns
    Type Description
    System.Boolean

    true if the specified point is within a range of 3.

    IsYLocation(Point)

    Specifies if the absolute difference in Y position of the specified point and the current location of the cursor is less than 3.

    Declaration
    public bool IsYLocation(Point pt)
    Parameters
    Type Name Description
    System.Drawing.Point pt

    The point in question.

    Returns
    Type Description
    System.Boolean

    true if the specified point is within a range of 3.

    VerticalMove(Boolean)

    Call this method to move the horizontal cursor up or down, to the next nearest data point in Y axis.

    Declaration
    public void VerticalMove(bool moveUp)
    Parameters
    Type Name Description
    System.Boolean moveUp

    True to move up, false to move down.

    VerticalMove(Double)

    Returns the series index value of the closest point to the specified y value. If closest point could not be found, -1 is returned.

    Declaration
    public int VerticalMove(double y)
    Parameters
    Type Name Description
    System.Double y

    Specifies the Y value in the chart near which the data point is to be found.

    Returns
    Type Description
    System.Int32

    The series index of the data point or -1 if nothing is nearby.

    Events

    Changed

    An event that is triggered when properties are changed.

    Declaration
    public event EventHandler Changed
    Event Type
    Type
    System.EventHandler
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved