About
RGraph is a JavaScript charts library based on
HTML5 SVG and canvas. RGraph is mature (over 17 years
old) and has a wealth of features making it an ideal
choice to use for showing charts on your website.
New datagrid in v6.21
In version 6.21 a new datagrid object has been 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.
Download
Get the latest version of RGraph (version 6.21, 10th April 2025) 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.
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.Whats happening in the world of RGraph at the moment?
Written by Richard Heyes, RGraph author, on 12th February 2025
In short - not a great deal has been happening with RGraph development over the past month or so due to other commitments - but that is about to change!
The next addition to RGraph will be a
javascript
based datagrid
component. This is possibly going to be based on a html
table or perhaps based on the css
table properties (ie display: table
). Here's an example of a css
table:
Date
Forename
Surname
Age
Gender
16th July 1981
James
Backnell
44
Male
12th March 1998
Luis
Hardman
26
Male
29th November 1969
Kevin
Hartley
65
Male
13th June 1974
June
Garri
50
Female
16th March 1989
Kerry
Looseman
35
Female
<style> .rgraph-css-table { display: table; width: 100%; } .rgraph-css-table-row { display: table-row; } .rgraph-css-table-cell-header, .rgraph-css-table-cell { display: table-cell; } .rgraph-css-table-cell-header { background-color: black; color: white; padding: 3px; font-weight: bold; padding-left: 15px; } .rgraph-css-table-row:nth-child(odd) { background-color: #eeee; } </style> <div class="rgraph-css-table"> <div class="rgraph-css-table-row"> <div class="rgraph-css-table-cell-header">Date</div> <div class="rgraph-css-table-cell-header">Forename</div> <div class="rgraph-css-table-cell-header">Surname</div> <div class="rgraph-css-table-cell-header">Age</div> <div class="rgraph-css-table-cell-header">Gender</div> </div> <div class="rgraph-css-table-row"> <div class="rgraph-css-table-cell">16th July 1981</div> <div class="rgraph-css-table-cell">James</div> <div class="rgraph-css-table-cell">Backnell</div> <div class="rgraph-css-table-cell">44</div> <div class="rgraph-css-table-cell">Male</div> </div> <div class="rgraph-css-table-row"> <div class="rgraph-css-table-cell">12th March 1998</div> <div class="rgraph-css-table-cell">Luis</div> <div class="rgraph-css-table-cell">Hardman</div> <div class="rgraph-css-table-cell">26</div> <div class="rgraph-css-table-cell">Male</div> </div> <div class="rgraph-css-table-row"> <div class="rgraph-css-table-cell">29th November 1969</div> <div class="rgraph-css-table-cell">Kevin</div> <div class="rgraph-css-table-cell">Hartley</div> <div class="rgraph-css-table-cell">65</div> <div class="rgraph-css-table-cell">Male</div> </div> <div class="rgraph-css-table-row"> <div class="rgraph-css-table-cell">13th June 1974</div> <div class="rgraph-css-table-cell">June</div> <div class="rgraph-css-table-cell">Garri</div> <div class="rgraph-css-table-cell">50</div> <div class="rgraph-css-table-cell">Female</div> </div> <div class="rgraph-css-table-row"> <div class="rgraph-css-table-cell">16th March 1989</div> <div class="rgraph-css-table-cell">Kerry</div> <div class="rgraph-css-table-cell">Looseman</div> <div class="rgraph-css-table-cell">35</div> <div class="rgraph-css-table-cell">Female</div> </div> </div>
And here's the same table but created using html
markup instead:
Date | Forename | Surname | Age | Gender |
16th July 1981 | James | Backnell | 44 | Male |
12th March 1998 | Luis | Hardman | 26 | Male |
29th November 1969 | Kevin | Hartley | 65 | Male |
13th June 1974 | June | Garri | 50 | Female |
16th March 1989 | Kerry | Looseman | 35 | Female |
<style> table.rgraph-datagrid { width: 100%; } table.rgraph-datagrid thead td { background-color: black; color: white; padding: 3px; font-weight: bold; padding-left: 15px; } table.rgraph-datagrid tbody td { padding-left: 15px; } table.rgraph-datagrid tbody tr:nth-child(odd) { background-color: #eeee; } table.rgraph-datagrid tfoot tr td { background-color: black; height: 30px; } </style> <table class="rgraph-datagrid"> <thead> <tr> <td>Date</td> <td>Forename</td> <td>Surname</td> <td>Age</td> <td>Gender</td> </tr> </thead> <tbody> <tr> <td>16th July 1981</td> <td>James</td> <td>Backnell</td> <td>44</td> <td>Male</td> </tr> <tr> <td>12th March 1998</td> <td>Luis</td> <td>Hardman</td> <td>26</td> <td>Male</td> </tr> <tr> <td>29th November 1969</td> <td>Kevin</td> <td>Hartley</td> <td>65</td> <td>Male</td> </tr> <tr> <td>13th June 1974</td> <td>June</td> <td>Garri</td> <td>50</td> <td>Female</td> </tr> <tr> <td>16th March 1989</td> <td>Kerry</td> <td>Looseman</td> <td>35</td> <td>Female</td> </tr> </tbody> <tfoot> <tr> <td colspan="5"></td> <tr> </tfoot> </table>As you can see they're similar though the
html
version is a bit less text. This won't make a huge difference though as the table
will be created and rendered dynamically - so the size of the source-code is a non-issue The html
version has an extra gap between the cells - which could be removed very easily - but I actually find it visually appealing so I think that if I do go down the html
route then I may leave it as the default.
All being well the datagrid
module will be a part of the next version of RGraph (version 6.21
).