MENU
.net Powerful JavaScript charts
About
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.

More »

 

Version 7.20
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.

Download »

 

Download
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.

Download »

 

Latest forum posts
These are the latest support forum posts that have been posted or updated.


16th June, Rachel
I have a question about the 3D Bar chart
12th June, Marco
Should I use SVG or canvas for the charts on my website?
9th June, Richard
New version of RGraph: version 7.20
3rd June, Patrick
Question about installing RGraph
1st June, Ouja
How do I add a click event to a bar in my Bar chart?


Support forum »

 

License
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 »

Are there any plans to make a NodeJS package?


Posted by Tiago Caldeira at 10:48 on Wednesday 17th August 2022 [link]
Hello there,

I'm currently working on a project that requires generating a line graph in NodeJS, saving the graph as a PNG and sending it over to a S3 bucket.

I've seen in your FAQ a way to make server-side graphs using PhantomJS which is now deprecated and not ideal, so I was wondering if there is any plans or even a target market for packaging RGraph as a npm module or not.

Additionally, if nothing's planned for it, would using Puppeteer (https://github.com/puppeteer/puppeteer) work for my use-case?

Thanks and best regards.

Posted by Richard at 11:04 on Wednesday 17th August 2022 [link]
I don't have any plans for a NodeJS npm at the moment. I tried using it once and it struck me as a little strange to say the least.

PhantomJS may be deprecated and (probably) unsupported but it's still usable if you want screenshots.

Looking at the Puppeteer Git Page it claims it can make screenshots for you so it looks like that would be great for what you want. I don't know how easy it is for it to do that though - but I can't imagine it would be difficult.

One thing to remember here is that canvas is initially transparent (not white). Now, when taking a screenshot of a webpage, this shouldn't really be an issue but, just in case, here's some code (again, that may not be necessary) that clears the canvas to white before drawing your chart (instead of leaving it as transparent):



myLine = new RGraph.Line({
    id: 'cvs',
    data: [4,8,6,3,5,4,6],
    options: {
    }
}).on('beforedraw', function (obj)
{
    RGraph.clear(obj.canvas, 'white');
}).draw();

[Replies are closed]