PointLineSeries Setvalues

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Arction_LasseP

Ali1945
Posts: 1
Joined: Fri Nov 02, 2018 6:39 pm

PointLineSeries Setvalues

Post by Ali1945 » Fri Nov 02, 2018 6:48 pm

Hi
I have built a Data acquisition system with 3 different sampling frequencies and now want to create a UI for show channels data.

for High speed channels i used SampleDataseries, and for other that have lower sampling frequencies, i used PointLineSeries to show all channels in a single chart.
Chart refresh rate is between 60 to 30 FPS.
i checked the user manual for adding point to PointLineSeries and found the best way is
chart.ViewXY.PointLineSeries[0].SetValues(xValuesArray, yValuesArray);

but SetValues function not found!
Should i add points one by one or is there any way to assign them at once?
is there any way to set x values array and y values array at once?

could you please help me?
I used LightningChart Ultimate v7.2.1

ArctionKestutis
Posts: 383
Joined: Mon Mar 14, 2016 9:22 am

Re: PointLineSeries Setvalues

Post by ArctionKestutis » Mon Nov 05, 2018 2:44 pm

Hi,
If you building real-time monitoring example, please check our Demo App. Demo contains the group of examples dedicated to 'real-time monitoring'. Check the source code of example for optimal usage and some tips.
I don't know how your acquisition system is build and how points are acquired, but you can have 3 SampleDataSeries with different SamplingFrequency (it is just another property as well as FirstSampleTimeStamp).
Unless, of course, other 2 series don't have regular sampling interval.
As it is written in User's Manual chart.ViewXY.PointLineSeries[0].SetValues(xValuesArray, yValuesArray), applicable in WinForms and WPF Non-bindable APIs. You probably using something else, because even you don't use latest version, it is very old method.
You could use various methods to add new points or replace points altogether. The usage depend on your needs (check examples for ideas). In general, for scrolling application most optimal way is to add points and scroll/sweep XAxis.

All the best.