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 use for showing charts on your website.

More »


Get the latest version of RGraph (version 6.18, 1st June 2024) 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.

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 can I create a chart from data in an HTML table?

Posted by Erwan at 10:17 on Saturday 11th September 2021 [link]
I have a table in html which is created every day, how can I add your library to create graphs from this table?
Do you have an example?


Posted by Richard at 12:27 on Saturday 11th September 2021 [link]
There isn't any function in RGraph that parse an HTML table and extracts data from it.

Th import tools are:

Google Sheets: https://www.rgraph.net/canvas/sheets.html
     CSV data: https://www.rgraph.net/canvas/csv.html
AJAX functions: https://www.rgraph.net/canvas/ajax.html

These get data and then provide it to you as a JavaScript array which you can then give to your chart object.

If you can get hold of the data before it's turned into HTML that would be best.

But if you can't, a function that parses HTML tables would be a good thing for RGraph to have so let me know and I'll make one. I'm not sure if colspans and rowspans would be feasible so it may just be a basic table parser.

Regardless, let me know and I'll make something that parses a table. Ideally give me a sample of your table too.

Posted by Erwan at 14:10 on Saturday 11th September 2021 [link]
There is an example on the site: https://www.highcharts.com/demo/column-parsed
and I already have a model but I am limited on the type of chart.
I would like to make donut and pie charts
Do you have an email for an attachment?


Posted by Richard at 22:28 on Wednesday 15th September 2021 [link]
For anyone who's interested - there's now a HTML table import utility that resulted from this that allows you to import data from a table that's on the page.

It will be available from version 6.03 which I'm aiming to release at the start of November.

There's a blog article that shows you some source code here:


[Replies are closed]