ScottPlot
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
ScottPlot.IDataSource Interface Reference

Internal interface used for Utility Functions within DataSourceUtilities More...

Inheritance diagram for ScottPlot.IDataSource:
ScottPlot.DataSources.FastSignalSourceDouble ScottPlot.DataSources.SignalSourceDouble ScottPlot.DataSources.SignalSourceGenericArray< T > ScottPlot.DataSources.SignalSourceGenericList< T > ScottPlot.DataSources.SignalXYSourceDoubleArray ScottPlot.DataSources.SignalXYSourceGenericArray< TX, TY > ScottPlot.DataSources.SignalConstSource< T >

Public Member Functions

int GetXClosestIndex (Coordinates mouseLocation)
 Gets the closest index to a specified coordinate for the array of X's.
 
Coordinates GetCoordinate (int index)
 Gets the X-Y coordinate from the data source at the specified index.
 
Coordinates GetCoordinateScaled (int index)
 Gets the X-Y coordinate from the data source at the specified index with any offsets and scaling applied.
 
double GetX (int index)
 Gets the X value from the data source at the specified index.
 
double GetXScaled (int index)
 Gets the X value from the data source at the specified index with any offsets and scaling applied.
 
double GetY (int index)
 Gets the Y value from the data source at the specified index.
 
double GetYScaled (int index)
 Gets the Y value from the data source at the specified index with any offsets and scaling applied.
 
bool 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 )
 

Properties

bool PreferCoordinates [get]
 When set true, DataSourceUtilities should prefer paths that utilize GetCoordinates
 
int Length [get]
 The length of the collection.
 
int MinRenderIndex [get]
 
int MaxRenderIndex [get]
 

Detailed Description

Internal interface used for Utility Functions within DataSourceUtilities

Member Function Documentation

◆ GetCoordinate()

Coordinates ScottPlot.IDataSource.GetCoordinate ( int  index)

Gets the X-Y coordinate from the data source at the specified index.

◆ GetCoordinateScaled()

Coordinates ScottPlot.IDataSource.GetCoordinateScaled ( int  index)

Gets the X-Y coordinate from the data source at the specified index with any offsets and scaling applied.

◆ GetX()

double ScottPlot.IDataSource.GetX ( int  index)

Gets the X value from the data source at the specified index.

◆ GetXClosestIndex()

int ScottPlot.IDataSource.GetXClosestIndex ( Coordinates  mouseLocation)

Gets the closest index to a specified coordinate for the array of X's.

Parameters
mouseLocationtypically the X coordinate should be used, unless the plot is rotated (then use Y)

Fastest execution should be using a BinarySearch, such as DataSourceUtilities.GetClosestIndex(double[], double, IndexRange)

◆ GetXScaled()

double ScottPlot.IDataSource.GetXScaled ( int  index)

Gets the X value from the data source at the specified index with any offsets and scaling applied.

◆ GetY()

double ScottPlot.IDataSource.GetY ( int  index)

◆ GetYScaled()

double ScottPlot.IDataSource.GetYScaled ( int  index)

Gets the Y value from the data source at the specified index with any offsets and scaling applied.

◆ IsSorted()

bool ScottPlot.IDataSource.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 )

Property Documentation

◆ Length

int ScottPlot.IDataSource.Length
get

◆ MaxRenderIndex

int ScottPlot.IDataSource.MaxRenderIndex
get

◆ MinRenderIndex

int ScottPlot.IDataSource.MinRenderIndex
get

◆ PreferCoordinates

bool ScottPlot.IDataSource.PreferCoordinates
get

When set true, DataSourceUtilities should prefer paths that utilize GetCoordinates


The documentation for this interface was generated from the following file: