Table of Contents

Class DigitalLineSeries

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

Digital line series. Uses arrays of uints as input data: uint[], where each value corresponds to 32 bit of data. Can be only used with Linear axis and DirectX11 engine.

public class DigitalLineSeries : BlockSeriesBase<uint[]>, IChartNode, IDisposable, IHighlightingItem, ILevelTriggable, ISingleLineSeriesSolveResultReturningSeries, IRealtimeShiftable, ITrackable
Inheritance
DigitalLineSeries
Implements
Inherited Members

Constructors

DigitalLineSeries()

Constructor.

public DigitalLineSeries()

DigitalLineSeries(ViewXY, AxisX, AxisY)

Constructor.

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

Parameters

owner ViewXY

Series swner.

axisX AxisX

Attached x-axis.

axisY AxisY

Attached y-axis.

Properties

BitCount

Added bit count.

public long BitCount { get; }

Property Value

long

DigitalHigh

Digital High value.

public double DigitalHigh { get; set; }

Property Value

double

DigitalLow

Digital Low value.

public double DigitalLow { get; set; }

Property Value

double

Digits

Series bools. Each uint contains 32 bits corresponding to bool.

public uint[][] Digits { set; }

Property Value

uint[][]

FirstSampleTimeStamp

First sample time stamp, usually 1/SamplingFrequency.

public double FirstSampleTimeStamp { get; set; }

Property Value

double

this[long]

Get value at index.

public bool this[long index] { get; }

Parameters

index long

Index to data.

Property Value

bool

Data value at index.

SamplingFrequency

Sampling frequency, in Hz. (sample interval is 1/SamplingFrequency).

public double SamplingFrequency { get; set; }

Property Value

double

Methods

AddBits(uint[], bool)

Add bits to end of series. Each input value correspond to 32 bit values.

public long AddBits(uint[] data, bool invalidateChart)

Parameters

data uint[]

Data array.

invalidateChart bool

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

Returns

long

Series bit count after adding.

Clear()

summary M:LightningChartLib.WinForms.Charting.SeriesXY.DigitalLineSeries.Clear
public override void Clear()

Construct()

Construct some properties.

protected override void Construct()

DeletePointsBeforeX(double, bool)

Delete all blocks where the last point in the block has smaller X value than the given value. Note, the block is formed when AddPoints method is called.

public void DeletePointsBeforeX(double xValue, bool compactMemory = true)

Parameters

xValue double

X value.

compactMemory bool

Compact memory.

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.

GetSampleAtIndex(long)

Get sample at index.

public bool GetSampleAtIndex(long index)

Parameters

index long

Index to sample.

Returns

bool

Sample 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.

SeekTriggerPos(out double, double, double, double, TriggeringEdge)

Detect triggering position from series data.

public bool SeekTriggerPos(out double trigPosX, double trigLevel, double seekStartX, double seekEndX, TriggeringEdge edge)

Parameters

trigPosX double

Output triggered X position.

trigLevel double

Trigger level Y value.

seekStartX double

Minimum X value that is investigated.

seekEndX double

Maximum X value that is investigated.

edge TriggeringEdge

Triggering edge.

Returns

bool

True if trigger position was detected, otherwise false.

SolveYCoordAtXCoord(float, bool)

Find nearest series point of given X-coordinate and get corresponding Y-coordinate.

public LineSeriesCoordinateSolveResult SolveYCoordAtXCoord(float x, bool useDIP = false)

Parameters

x float

X-coordinate in pixels or DIP.

useDIP bool

Use DIP instead of pixels as parameters.

Returns

LineSeriesCoordinateSolveResult

Solve result.

SolveYValueAtXValue(double)

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

public DigitalLineSeriesValueSolveResult SolveYValueAtXValue(double x)

Parameters

x double

X value.

Returns

DigitalLineSeriesValueSolveResult

Solve status. NearestX will be double.NaN if point is not in the data range.

Events

OldDataDropped

Occurs when old data samples have been dropped.

public event DigitalLineSeries.OldDataDroppedEventHandler OldDataDropped

Event Type

DigitalLineSeries.OldDataDroppedEventHandler