SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
Hi,
I’m using the MVVM pattern with my _chartSeries declared as:
ObjectModel.ObservableCollection(Of IChartSeriesViewModel)
What’s the recommended way to update (not append) data values in one of the data series?
I tried looking for something like _chartSeries]0].DataSeries.Update but couldn’t find anything.
Thanks,
–George
Hi George,
If you have created your series using DataSeriesSet.AddSeries(), they will be of type XyDataSeries<TX, TY>. Both XyDataSeries<TX, TY> and IXyDataSeries<TX, TY> have methods Append, Update, Insert, Remove. You’ll need to perform a cast as IChartSeriesViewModel exposes the series as type IDataSeries.
Hope that helps,
Andrew
using (var s = DataSeriesSet.SuspendUpdates()) { dataSeries.Insert(...) }Can you try that and let me know how it performs? If its poor we might need an InsertRange or another interface method to allow re-setting of data. Best regards, Andrew
Please login first to submit.