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

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

    Parameters

    XCoord
    X client coordinate.
    YCoord
    Y client coordinate.
    element
    Element parameter indicates which plot element is used.
    SeriesIndex
    Data series index.
    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