In my WPF application I have a D3 ChartPlotter where I was able to plot 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 is (relevant part of) the code 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");
What I want to do now is remove this plot and redraw it using a different set of points. Unfortunately I'm unable to find anything that goes in that direction both in the (poor) documentation of D3 and in the web.
Any suggestion about what to do or where to look?
Thanks!