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>
This is the code that generates the chart:
    bar = new RGraph.SVG.Bar({
        id: 'chart-container',
        data: [8,5,9,3,5,2,4],
        options: {
            marginTop: 50,
            marginBottom: 75,
            hmargin: 20,
            xaxisLabels: [
                'Wednesday\nresults\n (winner!)',
            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