An SVG Bar chart using sequential colors
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: 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: [44865,81856,63254,34568,58431,44956],
options: {
xaxisLabels: ['Jan','Feb','Mar','Apr','May','Jun'],
gutterLeft: 100,
colors: [
'red','blue','pink','green','rgb(255,67,169)','brown','#cfc'
],
colorsSequential: true,
yaxisUnitsPre: '$',
yaxisDecimals: 1,
yaxisPoint: ',',
yaxisThousand: '.',
yaxis: false,
backgroundGridVlines: false,
backgroundGridBorder: false,
title: 'A Bar chart with sequential colors'
}
}).grow();
</script>
« Back