RGraph is a JavaScript charts library based on
HTML5 SVG and canvas. RGraph is mature (over 18 years
old) and has a wealth of features making it an ideal
choice to use for showing charts on your website.
Version 7.11 (released in March 2026) is the
latest version of RGraph and contains just a few
updates to the code which you can see on
the changelog page. There's
a new dumbbell variation for the Bar and Horizontal bar
charts (both SVG and canvas) and the
front page layout of the
website has been tweaked.
In the April 2025 (v6.21) release a new datagrid object
was added.
This makes it easy to add static or dynamic data
tables to your pages. It can be used whether you use the
canvas or SVG libraries or entirely standalone.
Get the latest version of RGraph (version 7.11, 21st March 2026) from
the download page. You can read the changelog here. There's also older versions available,
minified files and links to cdnjs.com hosted libraries.
Drawing the chart a second time doesn't clear the previous chart
Posted by Roberto at 12:20 on Thursday 22nd April 2021[link]
Hello,
I should draw the graph and based on the input data updating the graph with the new data, and this works but draw the new bars on top of the old ones without gradually removing the bars of the previous graph, without updating the graph. How can I solve?
Thanks
Posted by Richard at 16:24 on Thursday 22nd April 2021[link]
You can use the RGraph.clear() function to clear the canvas before drawing a second time. For example:
var canvas = myObject.canvas;
RGraph.clear(canvas);
PS. If you want an animated change then the Bar chart supports this by supplying the new data to the grow() function. There's an example here: