I have a simple web server embedded on a microcontroller. One of the web pages allows the user to plot captured data (in CSV format). The page first loads all of the data and presents it to the user, but then I want to allow the user to do things like select and deselect data (columns), change line colors and change data scales. When I naively call RGraph.SVG.Line a second time, it simply redraws the modified chart over top of the already existing image. How do I get RGraph to delete the previous image and start over?
I've tried the following (separately):
RGraph.Clear(document.getElementById("plotDiv"));
RGraph.ObjectRegistry.Clear();
document.getElementById("plotDiv").innerHTML="";
"RGraph.Clear" and "Graph.ObjectRegistry.Clear" don't appear to be available in the SVG version of the library. When I delete the div's "innerHTML", the div is cleared, but then RGraph.SVG.Line doesn't draw anything at all when it's called again.
Is there anything else that I can try?