An SVG grouped Bar chart
This goes in the documents header:
<script src="RGraph.svg.common.core.js"></script>
<script src="RGraph.svg.common.key.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>
new RGraph.SVG.Bar({
id: 'chart-container',
data: [ [1,-2], [4,5], [4,2], [6,9], [4,3], [4,-3], [-4,8] ],
options: {
colors: ['#7CB5EC','#434348'],
xaxisLabels: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
xaxis: 'rgba(0,0,0,0.5)',
yaxis: false,
grouping: 'grouped',
hmargin: 20,
hmarginGrouped: 5,
yaxisMax: 20,
yaxisMin: -5,
title: 'A grouped Bar chart',
key: ['TRichard', 'Barry'],
gutterTop: 50
}
}).grow();
</script>
« Back