I craeted a chart with "LineSeriesDefinition" and the ItemSource is ObservableCollection<ObservableCollection<T>>
When <T> has the next properties:
"Tab (string)", "Date (DateTime)", "Count (int)"
for each sub list I made the next definitions:
SeriesMapping sm1 = new SeriesMapping();
LineSeriesDefinition d1 = new LineSeriesDefinition();
d1.ShowItemLabels =
true;
d1.ShowItemToolTips =
true;
sm1.SeriesDefinition = d1;
sm1.LegendLabel = objectValue.ToString();
sm1.CollectionIndex = collectionIndex;
sm1.ItemMappings.Add(
new ItemMapping("Tab", DataPointMember.LegendLabel));
sm1.ItemMappings.Add(
new ItemMapping("Tab", DataPointMember.Label));
sm1.ItemMappings.Add(
new ItemMapping("Date", DataPointMember.XValue));
sm1.ItemMappings.Add(
new ItemMapping("Count", DataPointMember.YValue));
chart.SeriesMappings.Add(sm1);
Everyting works fine untill I giving the ItsmSource a struct with the next capacity 13 ObservableCollections that each contains an ObservableCollection with 15 instances of T, then all the application crash