Class SignalXYSourceGenericList<Tx, Ty>
- Namespace
- ScottPlot.DataSources
- Assembly
- ScottPlot.dll
public class SignalXYSourceGenericList<Tx, Ty> : ISignalXYSource, IDataSource, IGetNearest
Type Parameters
Tx
Ty
- Inheritance
-
SignalXYSourceGenericList<Tx, Ty>
- Implements
- Inherited Members
- Extension Methods
Constructors
SignalXYSourceGenericList(IReadOnlyList<Tx>, IReadOnlyList<Ty>)
public SignalXYSourceGenericList(IReadOnlyList<Tx> xs, IReadOnlyList<Ty> ys)
Parameters
xs
IReadOnlyList<Tx>ys
IReadOnlyList<Ty>
Properties
Count
Number of values in the data source
public int Count { get; }
Property Value
MaximumIndex
Do not display data above this index
public int MaximumIndex { get; set; }
Property Value
MinimumIndex
Do not display data below this index
public int MinimumIndex { get; set; }
Property Value
Rotated
If enabled, Xs will be vertical and Ys will be horizontal.
public bool Rotated { get; set; }
Property Value
UsePixelOverlap
public bool UsePixelOverlap { get; }
Property Value
XOffset
X position of the first data point
public double XOffset { get; set; }
Property Value
XScale
Multiply X values by this scale factor (before applying offset)
public double XScale { get; set; }
Property Value
YOffset
Shift Y position of all values by this amount
public double YOffset { get; set; }
Property Value
YScale
Multiply Y values by this scale factor (before applying offset)
public double YScale { get; set; }
Property Value
Methods
GetAxisLimits()
Return the axis limits covered by these data
public AxisLimits GetAxisLimits()
Returns
GetColumnPixelsX(int, IndexRange, RenderPack, IAxes)
Given a pixel column, return the pixels to render its line. If the column contains no data, no pixels are returned. If the column contains one point, return that one pixel. If the column contains multiple points, return 4 pixels: enter, min, max, and exit
public IEnumerable<Pixel> GetColumnPixelsX(int pixelColumnIndex, IndexRange rng, RenderPack rp, IAxes axes)
Parameters
pixelColumnIndex
intrng
IndexRangerp
RenderPackaxes
IAxes
Returns
GetColumnPixelsY(int, IndexRange, RenderPack, IAxes)
Given a pixel column, return the pixels to render its line. If the column contains no data, no pixels are returned. If the column contains one point, return that one pixel. If the column contains multiple points, return 4 pixels: enter, min, max, and exit
public IEnumerable<Pixel> GetColumnPixelsY(int pixelColumnIndex, IndexRange rng, RenderPack rp, IAxes axes)
Parameters
pixelColumnIndex
intrng
IndexRangerp
RenderPackaxes
IAxes
Returns
GetIndex(double)
Get the index associated with the given X position
public int GetIndex(double x)
Parameters
x
double
Returns
GetIndex(double, IndexRange)
Get the index associated with the given X position limited to the given range
public int GetIndex(double x, IndexRange indexRange)
Parameters
x
doubleindexRange
IndexRange
Returns
GetNearest(Coordinates, RenderDetails, float)
Return the point nearest a specific location given the X/Y pixel scaling information from a previous render.
Will return None if the nearest point is greater than maxDistance
pixels away.
public DataPoint GetNearest(Coordinates mouseLocation, RenderDetails renderInfo, float maxDistance = 15)
Parameters
mouseLocation
CoordinatesrenderInfo
RenderDetailsmaxDistance
float
Returns
GetNearestX(Coordinates, RenderDetails, float)
Return the point nearest a specific X location given the X/Y pixel scaling information from a previous render.
Will return None if the nearest point is greater than maxDistance
pixels away.
public DataPoint GetNearestX(Coordinates mouseLocation, RenderDetails renderInfo, float maxDistance = 15)
Parameters
mouseLocation
CoordinatesrenderInfo
RenderDetailsmaxDistance
float
Returns
GetPixelsToDraw(RenderPack, IAxes, ConnectStyle)
Return pixels to render to display this signal. May return one extra point on each side of the plot outside the data area.
public Pixel[] GetPixelsToDraw(RenderPack rp, IAxes axes, ConnectStyle connectStyle)
Parameters
rp
RenderPackaxes
IAxesconnectStyle
ConnectStyle
Returns
- Pixel[]
GetPixelsToDrawHorizontally(RenderPack, IAxes, ConnectStyle)
public Pixel[] GetPixelsToDrawHorizontally(RenderPack rp, IAxes axes, ConnectStyle connectStyle)
Parameters
rp
RenderPackaxes
IAxesconnectStyle
ConnectStyle
Returns
- Pixel[]
GetPixelsToDrawVertically(RenderPack, IAxes, ConnectStyle)
public Pixel[] GetPixelsToDrawVertically(RenderPack rp, IAxes axes, ConnectStyle connectStyle)
Parameters
rp
RenderPackaxes
IAxesconnectStyle
ConnectStyle
Returns
- Pixel[]
GetRangeY(int, int)
Return the vertical range covered by data between the given indices (inclusive)
public CoordinateRange GetRangeY(int index1, int index2)