In my WPF application, I have a D3 ChartPlotter where I was able to build 4 LineGraphs. This is the XAML code:
<d3:ChartPlotter Name="plotter"> <d3:ChartPlotter.HorizontalAxis> <d3:HorizontalAxis Name="timeAxis" /> </d3:ChartPlotter.HorizontalAxis> <d3:ChartPlotter.VerticalAxis> <d3:VerticalAxis Name="accelerationAxis" /> </d3:ChartPlotter.VerticalAxis> </d3:ChartPlotter>
where d3 is the namespace for DinamicDataDisplay, and this (the corresponding part) of the code is behind.
var x = new List<int>(); var y = new List<int>(); for (var t = 0; t <= 10; t = t + 1) { x.Add(t); y.Add(Math.Pow(t,2)); } var xCoord = new EnumerableDataSource<int>(x); xCoord.SetXMapping(t => t); var yCoord = new EnumerableDataSource<int>(y); yCoord.SetYMapping(k => k); CompositeDataSource plotterPoints = new CompositeDataSource(xCoord, yCoord); plotter.AddLineGraph(plotterPoints, Brushes.Red.Color , 2, "MyPlot");
Now I want to delete this plot and redraw it using a different set of points. Unfortunately, I cannot find anything in this direction, either in the (poor) D3 documentation, or on the Internet.
Any suggestion on what to do or where to look?
Thanks!
source share