# A blue SVG Bar chart

This goes in the documents header:

    <script src="RGraph.svg.common.core.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: 950px; height: 300px" id="chart-container"></div>
    </div>

This is the code that generates the chart:

    <script>
        new RGraph.SVG.Bar({
            id: 'chart-container',
            data: [12.8,23.3,4.9,10.3,-2.6,4.3,7.5],
            options: {
                hmargin: 25,
                yaxisLabels: false,
                yaxisMin: -10,
                yaxisMax: 30,
                yaxis: false,
                xaxis: false,
                backgroundGrid: false,
                labelsAbove: true,
                labelsAboveUnitsPost: '%',
                labelsAboveOffsety: -5,
                labelsAboveDecimals: 1,
                labelsAboveSize: 10,
                colors: ['#00B9F2'],
                xaxisLabels: ['Hele handset','Oslo','Bergen','Trondheim','Stavanger','Kristiansand','Tromso'],
                xaxisTextSize: 8,
                xaxisTextColor: '#666',
                yaxisScale: false,
                title: 'Boligprisutvikling 2016',
                titleSubtitle: 'Prosentvis endring siste 12 maneder',
                titleSubtitleItalic: true,
                gutterTop: 45
            }
        }).wave();
    </script>

« Back