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

I would like a “Pause” button on my chart to temporarily suspend drawing updates, even while realtime data updates are still coming in to the databound DataSeries. Pressing the button again would re-enable drawing updates and show the data lines updated with all the data collected while drawing was previously paused.

Is there anything in the SciChart API to do this easily or would I need to do this manually (possibly by cloning the DataSeries when the chart is paused and databinding to the clones, then restoring the original binding when un-paused)?

Thanks!

  • You must to post comments
0
0

Hi Matthew,

You can suspend all drawing by calling SuspendUpdates:

using(sciChartSurface.SuspendUpdates())
{
     // Do work here, chart is suspended
}
// Chart automatically redraws

OR

IUpdateSuspender s = null;
try
{
    s = sciChartSurface.SuspendUpdates();
    // Do work here, chart is suspended
}
finally
{
   if (s != null)
      s.Dispose();
   // Chart automatically redraws
}

NOTE: This will suspend all drawing, as well as zoom / pan operations, tooltip updates etc… To find out how to use SuspendUpdates in MVVM, click here.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.