A basic SVG Bar chart

A demonstration of a simple Bar chart. The Bar chart does however have a title, subtitle and multi-line labels. The multiple lines are achieved using the carriage return/newline string: \r\n As you can see you can have multiple new lines in your text if you wish.

This goes in the documents header:
<script src="RGraph.svg.common.core.js"></script>
<script src="RGraph.svg.common.tooltips.js"></script>
<script src="RGraph.svg.bar.js"></script>
Put this where you want the chart to show up:
<div style="padding: 15px">
    <div style="width: 750px; height: 300px" id="chart-container"></div>
</div>
This is the code that generates the chart:
<script>
    bar = new RGraph.SVG.Bar({
        id: 'chart-container',
        data: [8,5,9,3,5,2,4],
        options: {
            marginTop: 50,
            marginBottom: 75,
            hmargin: 20,
            xaxisLabels: [
                'Monday\nresults',
                'Tuesday\nresults',
                'Wednesday\nresults\n (winner!)',
                'Thursday\nresults',
                'Friday\r\nresults',
                'Saturday\nresults',
                'Sunday\nresults'
            ],
            tooltips: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],                
            title: 'A basic Bar chart',
            titleSubtitle: 'A chart showing the daily totals for last week',
            titleSubtitleItalic: true,
            colors: ['red','pink'],
            shadow: true,
            shadowOpacity: 0.2
        }
    }).draw();
</script>