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.10 (released in January 2026) is the
latest version of RGraph and contains various updates
to the code which you can see on
the changelog page. There's
also a big tidy up in terms of comments and a significant
change to the way that the internal code is referenced which
should lead to a performance improvement in effects and
animations.
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.10, 18th January 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.
I have an error with my SVG chart: attribute d - expected number
Posted by Todd Shafer at 14:15 on Friday 18th March 2022[link]
Hello again, sorry to bug you. I updated to your newest code and I have one graph I can't get to work on, which works in the old code. Can you tell me what this error means?
// Create the clipPath element that sits inside the <def> tag
clip = RGraph.SVG.create({
svg: line.svg,
type: 'clipPath', // This is case sensitive!
parent: line.svg.defs,
attr: {
id: 'myClip'
}
});
// Create the shape element for the clip area
RGraph.SVG.create({
svg: line.svg,
parent: clip,
type: 'rect',
attr: { // These coordinates create a rect that is the same size as the top half of the SVG tag
x: 0,
y: 0,
width: 900,
height: 306
}
});
// Now set the clip-path attribute on the first Line charts all-elements group
line.svg.all.setAttribute(
'clip-path',
'url(#myClip)'
);
// Create the clipPath element that sits inside the <def> tag *** for the bottom half of the chart ***
clip2 = RGraph.SVG.create({
svg: line2.svg,
type: 'clipPath', // This is case sensitive!
parent: line2.svg.defs,
attr: {
id: 'myClip2'
}
});
// Create the shape element for the clip area
RGraph.SVG.create({
svg: line2.svg,
parent: clip2,
type: 'rect',
attr: { // These coordinates create a rect that is the same size as the bottom half of the SVG tag
x: 0,
y: 305,
width: 900,
height: 300
}
});
// Now set the clip-path attribute on the second Line charts all-elements group
line2.svg.all.setAttribute(
'clip-path',
'url(#myClip2)'
);
Posted by Richard at 20:45 on Friday 18th March 2022[link]
Can you give me some idea of what the chart s supposed to look like?
Posted by Todd Shafer at 20:53 on Friday 18th March 2022[link]