RGraph is a JavaScript charts library based on HTML5 SVG and canvas. RGraph is mature (over 15 years old) and has a wealth of features making it an ideal choice to show charts on your website.

More »


Get the latest version of RGraph (version 6.17) from the download page. There's also older versions available, minified files and links to cdnjs.com hosted libraries.

More »


RGraph can be used for free under the GPL or if that doesn't suit your situation there's an inexpensive (£129) commercial license available.

More »

How do I remove the old chart or reset the data?

Posted by Roshni at 10:09 on Tuesday 5th October 2021 [link]

I have dropdown of city and onchange I need to reload new chart based on values but the old chart is remain as it is and new values has been ovelapping so can you please let me know what should I do or is there any code to remove or reset chart data.

Posted by Richard at 10:26 on Tuesday 5th October 2021 [link]
What you need to do is remove the old chart from the ObjectRegistry - which is where RGraph keeps track of what objects there on the canvas.

The easiest way to do this is to use the reset() function instead of the clear() function:

var myCanvas = document.getElementById('cvs');


[Replies are now closed]