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

1 vote
6k views

I saw in tips and tricks for performance the use of

scichartsurface.suspendupdate

before something is added to the dataseries. But usually I don’t have access in ViewModel to surface. How can I suspendupdate in the ViewModel when updating the series?

Is dataseries.SuspendUpdate used for this?

  • Uwe Hafner asked 5 years ago
  • last active 5 years ago
1 vote
8k views

We keep getting asked What’s the best practice way to suspend the SciChartSurface in a multi-pane stock chart demo.

We have multiple ways of doing this.

By far the most effective and thread-safe way to do this is to call SuspendUpdates directly on the SciChartSurface. But how to do this in a ViewModel?

  • Andrew asked 5 years ago
  • last active 5 years ago
1 vote
6k views

How exactly does the SuspendUpdates work? I was under the impression that the surface the ViewportManager is attached to should not be redrawn until the IUpdateSuspender was disposed.

        using (var s = ViewportManager.SuspendUpdates())
        {
            // Clear ObservableCollection<IChartSeriesViewModel> that is databound to SciChartSurface.SeriesSource
            // Add new IChartSeriesViewModel to ObservableCollection
        }

The behavior I’m observing is after the clear it is blanking out the chart and then I see the new series drawn on the surface. I was expecting to see the chart immediately switch to the new series without first seeing the chart surface being cleared. Is this not the behavior of SuspendUpdates?

  • dkuo asked 5 years ago
  • last active 5 years ago
0 votes
8k views

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

  • Ian Carson asked 6 years ago
  • last active 5 years ago
0 votes
7k views

Hey

why do i need to use SuspendUpdates when i can append an array of data?

Thanks!

0 votes
8k views

Hi,

I’m using the MVVM pattern with my _chartSeries declared as:
ObjectModel.ObservableCollection(Of IChartSeriesViewModel)

What’s the recommended way to update (not append) data values in one of the data series?

I tried looking for something like _chartSeries]0].DataSeries.Update but couldn’t find anything.

Thanks,
–George

  • yefchak asked 7 years ago
  • last active 5 years ago
Showing 6 results
This template supports the sidebar's widgets. Add one or use Full Width layout.
SciChart WPF v6 BETA released! Note pricing/licensing changes are coming. Contact us to beat the rise!Read more
+