Pre loader

Append in background thread with overview

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

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
0
0

Good morning everybody! Do not look on other writing agencies, just take a look at this online https://cheap-essaywriting.com service. They always have wonderful gifts and the highest discounts for their cool regular buyers!!!

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.