SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy

We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

0
0

Hi,

I have a question concerning multithreaded access to the DataSeries:

We implemented an overview for our chart as described here. This works fine when we load data, add it to the series and then display it.

Now, for a certain use case we need to display live data. We implemented this in a background thread. We noticed that after some time the application freezes when the update frequency rises. In the documentation I found this:

NOTE: Considerations when a DataSeries is shared across multiple chart surfaces. Currently only a single parent chart is tracked, so DataSeries.SuspendUpdates() where the DataSeries is shared may have unexpected results.

I guess this is what is happening here…so what is the recommended approach to achieve something like this? Do we have to add the data on the UI thread if we want to have the Overview? Here it says:

When appending Data in a background thread, you cannot share a DataSeries between more than one SciChartSurface. You can still share a DataSeries between more than one RenderableSeries.

Does that mean we should create more different RenderableSeries for the main chart surface and the overview surface that are based on the same DataSeries? Any help would be appreciated!

Version
4.2.2.9777
  • You must to post comments
0
0

Hi Daniel,

Thanks for your question. So concerning this, it is just as the documentation says, you cannot share a DataSeries between multiple SciChartSurfaces when appending from a background thread.

Since the example contains two SciChartSurfaces, you cannot use same DataSeries for RenderableSeries from both SciChartSurfaces if updating it from a bacjground thread. In this case you will need either to copy the data and create additional DataSeries for Overview’s SciChartSurface, or have one shared DataSeries and update it on the UI thread.

Hope this helps!

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.