Table of Contents

Class LiteFreeformLineSeries

Namespace
LightningChartLib.WinForms.Charting.SeriesXY
Assembly
LightningChart.WinForms.Charting.NET4.dll

Lite freeform line series. Uses arrays of points as input data: double[N,2]. Can be only used with Linear axis and DirectX11 engine.

public class LiteFreeformLineSeries : BlockSeriesBase<double[,]>, IChartNode, IDisposable, IHighlightingItem, IRealtimeShiftable
Inheritance
LiteFreeformLineSeries
Implements
Inherited Members

Constructors

LiteFreeformLineSeries()

Constructor.

public LiteFreeformLineSeries()

LiteFreeformLineSeries(ViewXY, AxisX, AxisY)

Constructor.

public LiteFreeformLineSeries(ViewXY owner, AxisX axisX, AxisY axisY)

Parameters

owner ViewXY

Series swner.

axisX AxisX

Attached x-axis.

axisY AxisY

Attached y-axis.

Properties

this[int]

Get point at index.

public PointDouble2D this[int index] { get; }

Parameters

index int

Index to point.

Property Value

PointDouble2D

Point at index.

LimitYToStackSegment

Line rendering limit on y-axis.

public LimitYToSegment LimitYToStackSegment { get; set; }

Property Value

LimitYToSegment

PointCount

Added point count.

public int PointCount { get; }

Property Value

int

PointCountLimit

Point count limit. Series will contain at least this amount of points, but will limit to higher count based on data blocks.

public int PointCountLimit { get; set; }

Property Value

int

PointCountLimitEnabled

Enable/disable point count limiter. See PointCountLimit

public bool PointCountLimitEnabled { get; set; }

Property Value

bool

Points

Series points.

public double[][,] Points { set; }

Property Value

double[][,]

Methods

AddPoints(double[,], bool)

Add points to end of series, [N,2] format, where [i,0] is x and [i,1] is y.

public int AddPoints(double[,] data, bool invalidateChart)

Parameters

data double[,]

Data array.

invalidateChart bool

Update chart after adding data. Updating will raise CPU load, which is why usage of this method is not recommended with every call if points are added many times per second.

Returns

int

Series point count after adding.

Construct()

Construct some properties.

protected override void Construct()

GetMinMaxFromXRange(out double, out double, double, double, bool)

Get minimum and maximum Y value withing given X range.

public override bool GetMinMaxFromXRange(out double yMin, out double yMax, double xRangeMin, double xRangeMax, bool ignoreZeros)

Parameters

yMin double

Minimum Y value.

yMax double

Maximum Y value.

xRangeMin double

X range start.

xRangeMax double

X range end.

ignoreZeros bool

Ignore zeros.

Returns

bool

True if values were successfully detected.

GetPointAtIndex(int)

Get point at index.

public PointDouble2D GetPointAtIndex(int index)

Parameters

index int

Index to point.

Returns

PointDouble2D

Point at index.

GetXMinMax(out double, out double)

Get minimum X and maximum X of series X values

public override bool GetXMinMax(out double xMin, out double xMax)

Parameters

xMin double

X minimum.

xMax double

X maximum.

Returns

bool

True if minimum X and maximum X was obtained successfully.

IsPositionOver(int, int, bool)

Is position over series.

public override bool IsPositionOver(int x, int y, bool useDIP = true)

Parameters

x int

X coordinate.

y int

Y coordinate.

useDIP bool

Use DIP instead of pixels as parameters

Returns

bool

true if position is over series. Else false.

SolveNearestSampleByValue(double, double, out double, out double, out int)

summary M:LightningChartLib.WinForms.Charting.SeriesXY.LiteFreeformLineSeries.SolveNearestSampleByValue(System.Double,System.Double,System.Double@,System.Double@,System.Int32@)
public override bool SolveNearestSampleByValue(double xValue, double yValue, out double nearestSampleXValue, out double nearestSampleYValue, out int nearestIndex)

Parameters

xValue double
param xValue M:LightningChartLib.WinForms.Charting.SeriesXY.LiteFreeformLineSeries.SolveNearestSampleByValue(System.Double,System.Double,System.Double@,System.Double@,System.Int32@)
yValue double
param yValue M:LightningChartLib.WinForms.Charting.SeriesXY.LiteFreeformLineSeries.SolveNearestSampleByValue(System.Double,System.Double,System.Double@,System.Double@,System.Int32@)
nearestSampleXValue double
param nearestSampleXValue M:LightningChartLib.WinForms.Charting.SeriesXY.LiteFreeformLineSeries.SolveNearestSampleByValue(System.Double,System.Double,System.Double@,System.Double@,System.Int32@)
nearestSampleYValue double
param nearestSampleYValue M:LightningChartLib.WinForms.Charting.SeriesXY.LiteFreeformLineSeries.SolveNearestSampleByValue(System.Double,System.Double,System.Double@,System.Double@,System.Int32@)
nearestIndex int
param nearestIndex M:LightningChartLib.WinForms.Charting.SeriesXY.LiteFreeformLineSeries.SolveNearestSampleByValue(System.Double,System.Double,System.Double@,System.Double@,System.Int32@)

Returns

bool
returns M:LightningChartLib.WinForms.Charting.SeriesXY.LiteFreeformLineSeries.SolveNearestSampleByValue(System.Double,System.Double,System.Double@,System.Double@,System.Int32@)

SolveYCoordsAtXCoord(float, bool)

Find series points of given X-coordinate and get corresponding Y-coordinates.

public IList<LineSeriesCoordinateSolveResult> SolveYCoordsAtXCoord(float x, bool useDIP = false)

Parameters

x float

X-coordinate in pixels or DIP.

useDIP bool

Use DIP instead of pixels as parameters.

Returns

IList<LineSeriesCoordinateSolveResult>

List of results at x-coordinate.

SolveYValueAtXValue(double)

Solving single y-value at x-value is not supported. Use SolveYValuesAtXValue() method instead.

public override LineSeriesValueSolveResult SolveYValueAtXValue(double x)

Parameters

x double

X value.

Returns

LineSeriesValueSolveResult
returns M:LightningChartLib.WinForms.Charting.SeriesXY.LiteFreeformLineSeries.SolveYValueAtXValue(System.Double)

SolveYValuesAtXValue(double)

Solve Y value on given X value. Returned value will be interpolated, if X is between sequential points X values.

public IList<LineSeriesValueSolveResult> SolveYValuesAtXValue(double x)

Parameters

x double

X value.

Returns

IList<LineSeriesValueSolveResult>

List will be empty if X is not in the data range.

Events

OldDataDropped

Occurs when old data samples have been dropped.

public event LiteFreeformLineSeries.OldDataDroppedEventHandler OldDataDropped

Event Type

LiteFreeformLineSeries.OldDataDroppedEventHandler