This is a migrated thread and some comments may be shown as answers.

[Solved] Update chart display as data changes

1 Answer 104 Views
Chart for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gary
Top achievements
Rank 1
Gary asked on 20 Aug 2012, 05:30 PM
I have a class MyClass that contains an array called MyChartSeries. MyChartSeries contains MyChartData objects that each has a Value and Category property. I have a BarSeries that is binded to MyChartSeries.

MyClass inherits from the default BindableBase class, so every time an element in MyChartSeries is changed, I call MyClass.OnPropertyChanged("MyChartSeries")

However, my bar chart never changes when MyChartSeries is changed. Any ideas why? Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Accepted
Georgi
Telerik team
answered on 22 Aug 2012, 10:47 AM
Hi Gary,

Thank you for contacting us and for your question.

Internally a data-bound ChartSeries will check whether the specified ItemsSource implements the INotifyCollectionChanged interface and if yes will listen to the CollectionChanged event. So, you will need to either put the chart data in an ObservableCollection or to implement your own INotifyCollectionChanged routine.

I hope this helps. Let me know if I can assist you in some other way.

All the best,
Georgi
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart for XAML
Asked by
Gary
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or