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
- Benjamin de Ocampo asked 9 years ago
- last edited 9 years ago
- You must login to post comments
I attached my test app.
Thanks for the quick response.
Benjamin
- Benjamin de Ocampo answered 9 years ago
- You must login to post comments
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
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
- Guest answered 9 years ago
- last edited 9 years ago
- You must login to post comments
Thanks for the response Yuriy.
How can I get a performant chart that is continuously updating, with working modifiers? Is that achievable?
- Benjamin de Ocampo answered 9 years ago
-
Please take a look at the articles behind the links above, especially this one: 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 Also could I ask you to follow the one-question-several-answers model, to make this forum looking like StackOverflow? So please comment answers and update your posts or create a new thread for more questions. Thanks!
- You must login to post comments
Please login first to submit.