ComponentOne Chart for WPF and Silverlight
C1.WPF.C1Chart Namespace / ChartView Class / DataIndexFromPoint Method
Point in the control coordinates.
Index of series.
Measure option.
Distance from the data point to the specified point.


In This Topic
    DataIndexFromPoint Method
    In This Topic
    Get the index of closest data point that corresponds to the specified point.
    Syntax
    'Declaration
     
    
    Public Function DataIndexFromPoint( _
       ByVal pt As Point, _
       ByVal seriesIndex As Integer, _
       ByVal option As MeasureOption, _
       ByRef distance As Double _
    ) As Integer
    'Usage
     
    
    Dim instance As ChartView
    Dim pt As Point
    Dim seriesIndex As Integer
    Dim option As MeasureOption
    Dim distance As Double
    Dim value As Integer
     
    value = instance.DataIndexFromPoint(pt, seriesIndex, option, distance)
    public int DataIndexFromPoint( 
       Point pt,
       int seriesIndex,
       MeasureOption option,
       out double distance
    )

    Parameters

    pt
    Point in the control coordinates.
    seriesIndex
    Index of series.
    option
    Measure option.
    distance
    Distance from the data point to the specified point.

    Return Value

    The index of the data point that is closest to the specified point.
    See Also