A Bar chart with long labels

[No canvas support]

This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.bar.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="600" height="250">
    [No canvas support]
This is the code that generates the chart:
    var data = [[4,5,3],[4,8,6],[4,2,4],[4,2,3],[1,2,3],[8,8,4],[4,8,6]];

    new RGraph.Bar({
        data: data,
        options: {
            labels: [
                'Mondays sales',
                '\r\nTuesdays sales',
                'Wednesdays sales',
                '\r\nThursdays sales',
                'Fridays sales',
                '\r\nSaturdays sales',
                'Sundays sales'
            colors: ['red','yellow', 'pink'],
            grouping: 'stacked',
            gutterLeft: 100,
            gutterRight: 5,
            gutterTop: 5,
            gutterBottom: 105,
            textAngle: 45,
            strokestyle: 'rgba(0,0,0,0)',
            backgroundGridAutofitNumvlines: 7,
            labelsOffsety: 7

Share on Facebook Share on Twitter

« Back