Pre loader

Updating Mountain Chart



I am evaluating SciChart and have been very impressed so far with the power and ease of use.

I have a need to plot a single series Mountain style chart with 64K data points and then update around 10 times a second. The X values are fixed, the Y values may vary from update to update.

Is there a way to prevent redraws while I am updating the data in the series (planning on using a loop calling dataSeries.Update(TX, TY) for each point unless you can suggest a better way)

Thanks and Kind Regards


  • You must to post comments

Hello there,

Thank you for trying out SciChart! The best way to achieve what do you want is to use DataSeries.Update(). Also you could take a look at Updating a point in chart post – there you can find some useful information. Alternatively, you could consider using IDataSeries Find/Remove/Insert methods. And you should use SciChartSurface.SuspendUpdates() call to prevent redraws when series data is updating:

            // Batch updates with one redraw
            using (sciChart.SuspendUpdates())
               //Update series here

Hope this is helpful!

Best regards,

  • Yuriy Zadereckiy
    Quick tip: if you are going to update all values, it is better to use a FIFO chart. When you have fixed X values, and updating Y values, it is a lot faster then calls to Update()! Please, take a look at our Spectrum Analyzer example. It demonstrates approach of using FIFO chart for constantly changing Y-values. Please, give us any feedback what do you think about. Yuriy
  • Mark Attwood
    Yuriy, Thanks for your prompt replies. The speed and detail of replies from you and Andrew that I see on here is the second reason I will be buying this product (the first being how well SciChart works and the third being how good the starter examples are) However I had already tried using the IXyDataSeries.Update(IEnumerable, IEnumerable) approach that I saw in the Spectrum Analyser example but I am unable to get it to compile. I probably should have pointed out I am using the Beta 1.5 control in Visual Studio 2012 and referencing the WPF 4.5 control in a .NET 4.5 project. It is strange because the IXyDataSeries.Update(IEnumerable, IEnumerable) overload shows in the object browser (and the SciChart Class Library help file) but I get the following errors in the IDE: Error 1 The best overloaded method match for 'Abt.Controls.SciChart.IXyDataSeries.Update(double, double)' has some invalid arguments Error 2 Argument 1: cannot convert from 'System.Collections.Generic.IEnumerable' to 'double' Error 3 Argument 2: cannot convert from 'System.Collections.Generic.IEnumerable' to 'double' (as an aside I did notice that in the help file the other two Update overloads: XyDataSeries(TX, TY).Append Method (IEnumerable(TX), IEnumerable(TY)[]) XyDataSeries.Append Method (TX, array[]) show red "Missing Documentation") Kind Regards Mark
  • Yuriy Zadereckiy
    [comment[Hi Mark, There was several issues connected with .NET 4.5, but all known are fixed now. In this case compiler is right - there isn't such method Update taking collections as parameters. It is an advantage of using FIFO chart - it just reload the entire buffer, push all points out and internally uses circular buffer which is an efficient implementation. For this purpose you should use the
    void Append(IEnumerable<TX> x, IEnumerable<TY> y)
    method, which exists in IXyDataSeries. Please, check UpdateData() method in the Spectrum Analyser example - it uses this method. Sorry - it's my fault that I didn't provide you with clear explanations. Please, feel free to ask if you have any more questions! Best regards, Yuriy
  • Mark Attwood
    Hi Yuriy, Sorry about that - I went and used Update instead of Append Thanks again for your help Mark
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies