SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & 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!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

0
0

Hi Andrew

We would like to be able to set SuspendUpdates in an MVVM scenario as we are using ObservableCollection of IChartSeriesViewModel to drive chart datatemplates.

We are getting some flickering when updating multiple series on the chart due to y axis rescaling.

Is there a bindable property on the SciChartSurface we can use for this? Or do you have another approach?

Thanks in advance
Regards
Ian

  • You must to post comments
1
0

Hi Ian,

One surefire way of ensuring you don’t get flicker is to update your DataSeries on the UI thread. The renderer draws on the UI and so updates of the DataSeries on a background thread can cause flicker, e.g. if you Clear then Add data to a DataSeries and the render operation occurs between the two you will momentarily see the redraw.

Another way is yes, you can call SuspendUpdates via a DataSeries. See the DataSeries.SuspendUpdates() method, which works the same as on the ParentSurface. However, note this makes the assumption that there is a 1:1 relationship between DataSeries and SciChartSurfaces (you have not registered a DataSeries on two parent surfaces).

Finally a surefire way to do this is create an attached Behaviour which binds to a property in your view model, and sets SuspendUpdates() / calls Dispose() on the IUpdateSuspender when the property changes.

Hope this helps,
Andrew

  • Ian Carson
    Hi Andrew Didn't know about DataSeries.SuspendUpdates(). That works nicely and fixed the problem. I have noted your warning about a 1-to-1 relationship - luckily not a problem for our solution currently. Thanks for the info Regards Ian
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.