Class PersistentSeriesRenderingLayer
- Namespace
- LightningChartLib.WinForms.Charting.Views.ViewXY
- Assembly
- LightningChart.WinForms.Charting.NET4.dll
Persistent series rendering layer. Series can be rendered in a bitmap layer and the actual series freed.
Saves a lot of memory, CPU and GPU resources, especially when rendering hundreds or thousands of series.
The layer itself is rendered in the chart just before line series objects.
public class PersistentSeriesRenderingLayer : PersistentSeriesRenderingLayerBase, IChartNode, IDisposable
- Inheritance
-
PersistentSeriesRenderingLayer
- Implements
- Inherited Members
Examples
Consider a typical use case of FFT monitoring, where one data line series is collected periodically and added in the layer in full. The layer shows historic information of thousands of FFT strips. By using the persistent series layer, each series has millions of points, and the dozens of new strips can be added every second. By freeing the series itself after rendering it to the layer, the total memory consumption does not rise, and the system won't run out of memory even if the monitoring lasts several weeks.
Constructors
PersistentSeriesRenderingLayer()
public PersistentSeriesRenderingLayer()
PersistentSeriesRenderingLayer(ViewXY, AxisX)
Constructor
public PersistentSeriesRenderingLayer(ViewXY ownerView, AxisX xAxis)
Parameters
Methods
Clear()
Clears the rendering layer and sets the size to size of the chart control. Sets all data transparent (ARGB=0,255,255,255).
public void Clear()
Clear(Color)
Clears the rendering layer. Sets all data to given color.
public void Clear(Color color)
Parameters
colorColorColor
MultiplyAlpha(double)
Allows decaying or bringing the layer more visible.
public void MultiplyAlpha(double factor)
Parameters
factordoubleMultiply factor
Examples
MultiplyAlpha(0.8) sets the alpha to 80% of existing alpha (decay). MultiplyAlpha(2) would adjust it to 200% (more visible).
RenderSeries(List<PointLineSeriesBase>)
Renders list of given series into the layer, in one batch. Faster than calling RenderSeries many times.
public PersistentRenderingResult RenderSeries(List<PointLineSeriesBase> seriesList)
Parameters
seriesListList<PointLineSeriesBase>List of series to render