Dynamic number of LineSeries in WPF Charting using MVVM
-
Monday, April 16, 2012 2:54 PM
I have gone through lot of sample projects on the net which claim to follow the MVVM pattern and have dynamic number of LineSeries (or) Series objects in a Chart,but rather each one of them just create a wrapper or inherit the Chart class and somewhere call the chart.Series.Add() function to add the series.
I was searching for an example where we have ObservableCollection<ObservableCollection<int,int>> and I bind this List to the Chart.Whenver I add or remove any ObservableCollection from the outer list a Series automatically should get populated.
Thanks in Advance.
All Replies
-
Monday, April 16, 2012 3:13 PM
I have found this :
http://jmorrill.hjtcentral.com/Home/tabid/428/EntryId/351/Silverlight-Charts-Binding-multiple-Series.aspx
I have ObservableCollection<ObservableCollection<KeyValuePair<int,int>>> ListOfLists and
I set Helper:ChartHelper.SeriesSource="{Binding ListOfList}"
but still it does not work
-
Friday, April 20, 2012 4:41 AMModerator
Hi Mohnish,
I search on internet, and find these link may help you out, please check out it:
http://blog.thekieners.com/2010/02/07/databinding-multi-series-charts/
Hope it helps.
Have a nice day.
Annabella Luo[MSFT]
MSDN Community Support | Feedback to us
- Marked As Answer by Annabella LuoModerator Thursday, April 26, 2012 5:59 AM

