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:
     CSV data:
AJAX functions:

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:
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 now closed]