An SVG Pareto Bar chart

This goes in the documents header:
<script src="RGraph.svg.common.core.js"></script>
<script src="RGraph.svg.bar.js"></script>
<script src="RGraph.svg.line.js"></script>
Put this where you want the chart to show up:
<div style="padding: 15px">
    <div style="width: 650px; height: 300px" id="chart-container"></div>
</div>
This is the code that generates the chart:
<script>
    new RGraph.SVG.Bar({
        id: 'chart-container',
        data: [55,15,12,7,6,4,1],
        options: {
            yaxisMax: 100,
            hmargin: 15,
            backgroundGridVlines: false,
            backgroundGridBorder: false,
            colors: ['Gradient(red:red:white)'],
            shadow: true,
            yaxis: false,
            xaxis: false,
            xaxisLabels: ['Mon','Tue','Wed','Thu','Fri','Sat','Sun']
        }
    }).wave();

    new RGraph.SVG.Line({
        id: 'chart-container',
        data: [55,70,82,89,95,99,100],
        options: {
            hmargin: 45,
            colors: ['black'],
            tickmarksStyle: 'endcircle',
            tickmarksSize: 3,
            backgroundGrid: false,
            xaxis: false,
            yaxis: false,
            shadow: true
        }
    }).trace();
</script>

« Back