Pre loader

After changing size the SciChartSurface does not refresh correctly

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

Answered
1
0

I am trying to find a possible problem why I see the effect in the picture after resizing.
Everything was fine in a sample with very high data sample rates. Now I refactored into my real life code and started using WPF Binding and the like. But now I see this effect on the real life code.

I am already:

  • appending the new data inside a separate worker thread
  • calling suspendupdate on the control
  • using XySeriesData<double, double>. Before that I used XySeriesData<DateTime, double> and thought it was the new DateTime I was using. But still see the effect when I switched back to double.

What I did change from the example to real life:

  • Mainly added databinding for RenderSurface and RenderableSeries. They are only set and changed at the beginning of the test run.

I don’t really know where to check from here on. What else could cause this effect?

Images
  • You must to post comments
Best Answer
1
0

Hi Uwe,

Ok so what happened above was this. We have a property in RenderSurfaceBase.UseResizeThrottle and RenderSurfacebase.ResizeThrottleMs. This was added in v3.2 of SciChart and by default is disabled (set to false) except for the Direct3D10RenderSurface, which has UseResizeThrottle=True, and ResizeThrottleMs=50ms.

What this does is it throttles the resize event, preventing multiple resizes from causing expensive recreations of a DirectX surface when the user resizes. Basically, in short, it simulates ‘ResizeEnd’ and saves a lot of resources in DirectX, but can also improve resize performance in other renderers.

However… our implementation uses DispatcherTimer. DispatcherTimer has a default priority of Background, which means the actual event is below the priority of most application events.

So, we’ve raised the priority to DispatcherPriority.Render in our timer to detect ResizeEnd, and this should fix the problem.

This has been deployed in v3.3.3.6240 of SciChart to our Nuget feed. Please test it and get back to me!

Best regards,
Andrew

  • Uwe Hafner
    The patch works. Great.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.