MENU
.net Powerful JavaScript charts

Older demo added to the download archive

Written by Richard Heyes, RGraph author, on 6th February 2022
After realising that an older demo that I'd shown a picture of hadn't actually been added to the download archive, now it has.

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,
            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,
            xaxisLabels: labels,
            xaxisLabelsAngle: 45,
            xaxisLabelsOffsety: 5,
            yaxisScaleMax: 15000
        }
    }).draw();
</script>