Avalonia Code OnlyItaliano

API › RAVAL

RLiveSeries class

public sealed class RLiveSeries

A curve of RChart that grows while the data arrive, from any thread.

Constructors

RLiveSeries(RChart chart, string name, int color = 0)

A live curve in the chart, with its name and the i-th color of RColor.Palette.

Properties

double Window { get; set; }

The span of abscissa kept and shown, from the last point back (NaN: all).

int MaxPoints { get; set; }

The most points kept: the oldest go (100 000).

RSeries Series { get; }

The curve as it is now in the chart (a new RSeries after each batch).

int Count { get; }

How many points are kept now (on the UI thread).

RSeriesStyle Style { get; set; }

Line, points or both (set on the UI thread).

Methods

void Add(double x, double y)

Adds a point, from any thread; the abscissas must grow.

void Add(DateTime t, double y)

Adds a point at a time (RTime.X), from any thread.

void Clear()

Removes every point (on the UI thread).

void Drain()

Takes the points waiting now, on the UI thread: what the Post does, callable directly by a test or a timer.