2D Chart for WinForms | ComponentOne
C1.Win.C1Chart.4.5.2 Assembly / C1.Win.C1Chart Namespace / ChartGroup Class / CoordToDataIndex Method
X client coordinate.
Y client coordinate.
Focus parameter indicates which coordinate is used.
Data series index of the closest data point.
Data point index of the closest data point.
Distance to the closest data point.

In This Topic
    CoordToDataIndex Method
    In This Topic
    Returns series and point indices and distance to the closest data point in the group given client coordinates.
    Syntax
    'Declaration
     
    Public Function CoordToDataIndex( _
       ByVal XCoord As System.Integer, _
       ByVal YCoord As System.Integer, _
       ByVal focus As CoordinateFocusEnum, _
       ByRef SeriesIndex As System.Integer, _
       ByRef PointIndex As System.Integer, _
       ByRef Distance As System.Integer _
    ) As System.Boolean
    public System.bool CoordToDataIndex( 
       System.int XCoord,
       System.int YCoord,
       CoordinateFocusEnum focus,
       ref System.int SeriesIndex,
       ref System.int PointIndex,
       ref System.int Distance
    )

    Parameters

    XCoord
    X client coordinate.
    YCoord
    Y client coordinate.
    focus
    Focus parameter indicates which coordinate is used.
    SeriesIndex
    Data series index of the closest data point.
    PointIndex
    Data point index of the closest data point.
    Distance
    Distance to the closest data point.

    Return Value

    The return value indicates successful calculation.
    Remarks
    Mouse coordinates are given in client coordinates.
    See Also