ObservableDataSource<System.Windows.Point> source1=new ObservableDataSource<System.Windows.Point>(); LineGraph line1=new LineGraph(source1); line1.Name = "Data1"; int i=0; start a timer to CaptureData... CaptureData(....,...) { if a CheckBox is checked...() { if (i == 0) { plotter.Children.Add(line1); } double graph_x = Convert.ToDouble(i); double graph_y = Convert.ToDouble(datapoint that I have); System.Windows.Point p1 = new System.Windows.Point(graph_x, graph_y); source1.AppendAsync(Dispatcher, p1); i++; } } Once the checkBox is unchecked { if (i != 0) { i=0; plotter.Children.Remove(line1); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)