Series selection

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
westreet
Posts: 2
Joined: Mon Oct 06, 2014 4:17 pm

Series selection

Post by westreet » Mon Oct 06, 2014 4:48 pm

please see attached file

first. every channel data is realtime data (1000sample/sec ~ 100000sample/sec)
lightning chart can handle that big amount of realtime data?
if it is possible how long data can be store?

all channel data will be stored array or pointlineseries
and if change selection of radio button, selected channel data are displayed lightningchart control (line chart)

please let me know way to solve it
mschart is too slow to does it

sorry for my poor english.
Attachments
lcchart.jpg
lcchart.jpg (27.34 KiB) Viewed 7272 times

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Series selection

Post by ArctionPasi » Mon Oct 06, 2014 6:08 pm

Hi,

yes, LightningChart can handle it 100 k samples / sec just fine.

See thread-fed multi-channel example, that is pretty close to your goal.
100 k samples/sec realtime, 3 channels
100 k samples/sec realtime, 3 channels
100ksamplesPerSec3channels.jpg (196.8 KiB) Viewed 7269 times
You can feed data to all series to same time, so their data arrays get updated. By setting series.Visible = false, it's hidden, and you can control that with your radio button events.

Set chart.ViewXY.AxisLayout.YAxisLayout = Layered, so they won't be stacked like in this example.

About maximum storage time. By default, SampleDataSeries uses SampleFormat = DoubleFloat, and therefore each data point takes 8 bytes.
By setting it to SampleFormat = SingleFloat, each data point takes only 4 bytes.

Say you have for example 2 GB to use, filling 3 series at same time, using 100 k samples / sec, SampleFormat = SingleFloat:

t = 2*1024*1024*1024 bytes / (3*100000 samples /sec * 4 bytes per sample) = 1789 seconds = ~30 minutes.

LightningChart has automatic destruction of outscrolled data, so it'll free memory. To enable automatic destruction, set ViewXY.DropOldData = true. Then the measurement time is practically unlimited.
LightningChart Support Team, PT

westreet
Posts: 2
Joined: Mon Oct 06, 2014 4:17 pm

Re: Series selection

Post by westreet » Tue Oct 07, 2014 10:04 am

thank you for your answer

and i have another question about that.

please see that attached picture.

i that case, how can i feed data to Lightning chart?

it is possible to use one series - multi chart?
Attachments
lcchart2.jpg
lcchart2.jpg (62.99 KiB) Viewed 7263 times

User avatar
ArctionPasi
Posts: 1367
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: Series selection

Post by ArctionPasi » Tue Oct 07, 2014 10:31 am

The objects can't be shared between charts. You'll need to create own series for both charts.

SamplesSingle property can share the same array, but that requires setting ViewXY.DropOldSeriesData = false, and assigning the Single[] array for to both chart's series. And you can't use ScrollPosition setting for X axis. So this is pretty much possible only for non-realtime data.

chart1.ViewXY.SampleDataSeries[0].SamplesSingle = yourSharedSamplesArray;
chart2.ViewXY.SampleDataSeries[0].SamplesSingle = yourSharedSamplesArray;

Don't use AddPoints in this approach because it recreates internal arrays for series when it grows large.
LightningChart Support Team, PT

Post Reply