I've made a simple bar chart:
The ItemPositionList is being regenerated on a timer every 5 seconds.
How can I update the chart ?
I've Try setting the ItemSource again - but I get a thread ownership exception
I want to make the update smooth without "repainting" things that did not change
Thanks,
Dani
BarSeriesDefinition barDefinition = new BarSeriesDefinition(); barDefinition.Appearance.Fill = new SolidColorBrush( Colors.Blue );ctrlLaneGraph.DefaultSeriesDefinition = barDefinition; SeriesMapping seriesMapping = new SeriesMapping();seriesMapping.LegendLabel = "Number of Items";seriesMapping.SeriesDefinition = new SplineSeriesDefinition(); seriesMapping.ItemMappings.Add(new ItemMapping("ItemStart", DataPointMember.XValue));seriesMapping.ItemMappings.Add(new ItemMapping("ItemPosition", DataPointMember.YValue)); seriesMapping.SeriesDefinition = barDefinition; ctrlLaneGraph.SeriesMappings.Add(seriesMapping); ctrlLaneGraph.ItemsSource = ItemPosisionList; ctrlLaneGraph.DefaultView.ChartArea.AxisX.LayoutMode = AxisLayoutMode.Auto;The ItemPositionList is being regenerated on a timer every 5 seconds.
How can I update the chart ?
I've Try setting the ItemSource again - but I get a thread ownership exception
I want to make the update smooth without "repainting" things that did not change
Thanks,
Dani
