Interface IDataSource
- Namespace
- ScottPlot
- Assembly
- ScottPlot.dll
Internal interface used for Utility Functions within DataSourceUtilities
public interface IDataSource
- Extension Methods
Properties
Length
The length of the collection
int Length { get; }
Property Value
MaxRenderIndex
int MaxRenderIndex { get; }
Property Value
MinRenderIndex
int MinRenderIndex { get; }
Property Value
PreferCoordinates
When set true, DataSourceUtilities should prefer paths that utilize GetCoordinates
bool PreferCoordinates { get; }
Property Value
Methods
GetCoordinate(int)
Gets the X-Y coordinate from the data source at the specified index
Coordinates GetCoordinate(int index)
Parameters
index
int
Returns
GetCoordinateScaled(int)
Gets the X-Y coordinate from the data source at the specified index with any offsets and scaling applied
Coordinates GetCoordinateScaled(int index)
Parameters
index
int
Returns
GetX(int)
Gets the X value from the data source at the specified index
double GetX(int index)
Parameters
index
int
Returns
GetXClosestIndex(Coordinates)
Gets the closest index to a specified coordinate for the array of X's
int GetXClosestIndex(Coordinates mouseLocation)
Parameters
mouseLocation
Coordinatestypically the X coordinate should be used, unless the plot is rotated (then use Y)
Returns
Remarks
Fastest execution should be using a BinarySearch, such as GetClosestIndex(double[], double, IndexRange)
GetXScaled(int)
Gets the X value from the data source at the specified index with any offsets and scaling applied
double GetXScaled(int index)
Parameters
index
int
Returns
GetY(int)
Gets the Y value from the data source at the specified index
double GetY(int index)
Parameters
index
int
Returns
GetYScaled(int)
Gets the Y value from the data source at the specified index with any offsets and scaling applied
double GetYScaled(int index)
Parameters
index
int
Returns
IsSorted()
When the collection is sorted, this will enable much quicker execution by allowing usage of BinarySearch methods ( GetNearest should call GetXClosestIndex when this is true )
bool IsSorted()