Pre loader

newly appended dataseries not rendering

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

0
0

Hi,
I’m evaluating your cool chart control when I stumbled into a problem.

Every time I added a new data the chart doesn’t render the updates. I have ZoomExtentsModifier in the chart so every time I double click the chart that’s the time the UI gets updated.

Here’s how I created the series…

        foreach (IChartSeries chartSeries in Series)
        {
            XyDataSeries<DateTime, double> data = new XyDataSeries<DateTime, double>();
            foreach (BaseModel model in chartSeries.Data)
            {
                data.Append(model.X, model.Y);
            }

            var series = new Abt.Controls.SciChart.Visuals.RenderableSeries.FastLineRenderableSeries(); 
            series.DataSeries = data;                                 
            series.SeriesColor = ((SolidColorBrush)chartSeries.Brush).Color;
            series.AntiAliasing = true;

            // add the series into the chart
            _chart.RenderableSeries.Add(series);


            chartSeries.DataChanged += (obj, args) => {

                var newData = (BaseModel)args.NewData;
                data.Append(newData.X, newData.Y);                    
            };
        }

As you can see, each series has its own thread for updating the data. Hope to get an answer soon.

Thanks!
Bench

  • You must to post comments
0
0

I attached my test app.

Thanks for the quick response.

Benjamin

  • You must to post comments
1
0

Hi Benjamin,

Thank you for the sample. We’ve investigated it and noticed, that you don’t update the VisibleRange on the XAxis, so the incoming data don’t appear.

By default, when you append data, SciChartSurface redraws, but does not update the XAxis or YAxis visible ranges. However you can turn on chart automatically scaling to fix data by setting AutoRange=”Always” on an axis, as it is demonstrated in our Performance demo example.

But in this case you loose interactivity via modifiers, because autorange is performed on every chart redraw.

Besides that, you could update the VisibleRange manually, as it is demonstrated in the Realtime Ticking StockChart example.

We have an article on this topic here:
http://support.scichart.com/index.php?/Knowledgebase/Article/View/17223/37/how-to-have-a-fixed-scrolling-time-range-on-the-xaxis-that-works-with-modifiers

http://support.scichart.com/index.php?/Knowledgebase/Article/View/17203/0/autorangenever-vs-autorangeauto-vs-autorangealways

https://www.scichart.com/questions/question/numericaxis-autoalignvisiblerange-without-autorange

Hope the above helps! Please feel free to comment if you have any more questions,

Best regards,
Yuriy

  • You must to post comments
0
0

Thanks for the response Yuriy.

How can I get a performant chart that is continuously updating, with working modifiers? Is that achievable?

  • You must to post comments
Showing 3 results
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