MENU
.net Powerful JavaScript charts
About
RGraph is a JavaScript charts library based on HTML5 SVG and canvas. RGraph is mature (over 16 years old) and has a wealth of features making it an ideal choice to use for showing charts on your website.

More »

 

Download
Get the latest version of RGraph (version 6.20, 1st December 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.

Download »

 

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 »

Older demo added to the download archive

Written by Richard Heyes, RGraph author, on 6th February 2022

I realised recently that a demo that I showed a screenshot of on this blog, albeit some time ago, wasn't in the download archive. So I've remedied this and the new demo is called demos/bar-grouped-purple.html (it'll be in the next release). Here's an example of it in case you're curious. The source code of the chart is as follows:

<script>
    labels = [
        '0 to 4','5 to 9','10 to 14','15 to 19','20 to 24','25 to 29','30 to 34',
        '35 to 39','40 to 44','45 to 49','50 to 54','55 to 59','60 to 64',
        '65 to 69','70 to 74','75 to 79','80 to 84','85 to 89','90+'
    ];
    
    myData = [
        [750,650],[850,800],[900,850],[1500,2800],[4000,7000],
        [6300,11500],[7000,11200],[6800,9800],[6800,9500],
        [7500,11200],[8500,12300],[8500,11000],[7500,7800],
        [6050,4500],[6900,5000],[8000,6400],[9000,8900],
        [8000,10000],[5900,11850]
    ];

    new RGraph.Bar({
        id: 'cvs',
        data: myData,
        options: {
            title: 'A demo of the new style of tooltips',
            titleSize: 16,
            titleBold: true,
            tooltips: '%{global:labels[%{group}]} %{key}',
            tooltipsFormattedKeyColorsCss: {
                border: '1px solid #ccc'
            },
            tooltipsFormattedKeyLabels: ['Male','Female'],
            tooltipsCss:{
                textAlign: 'left'
            },
            tooltipsOffsety: -5,
            colors: ['#5C1955','#62A3B3'],
            marginBottom: 75,
            marginLeft: 75,
            xaxis: false,
            yaxis: false,
            xaxisLabels: labels,
            xaxisLabelsAngle: 45,
            xaxisLabelsOffsety: 5,
            yaxisScaleMax: 15000,
            backgroundGridVlines: false
        }
    }).draw();
</script>