Home forums Using CanvasJS clearing or redrawing graph Reply To: clearing or redrawing graph



Sure – open up the site. After the chart is drawn, change:

Initial conc (first input box) from 250 to 100 (this controls where the line short start on the y-axis)
Max time on x-axis (bottom input box) from 250 to 100 (this controls the length of the x-axis dataset)

Hit recalculate graph button.

See what happens to the graph around x = 100?
I want the redraw to clear all the “old” data points beyond x = 100. But the “old” data points from 100-250 are still there (and the graph even tries to spline the two datasets together!).

Is there a simple way of clearing the old traces away “on click”?