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.20 (released in June 2026) is the
latest version of RGraph and the major change in
this version is an update to the default values
of properties making for better looking charts without
having to set any properties.
Read more about this and other changes in
the changelog.
Get the latest version of RGraph (version 7.20, 9th June 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]