A Horizontal Bar chart showing finance information
This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.hbar.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="600" height="500">
[No canvas support]
</canvas>
This is the code that generates the chart:
<script>
// Don't need to assign the chart to a variable
new RGraph.HBar({
id: "cvs",
data: [6,9,13,23,25,31,44],
options: {
marginLeftAuto: true,
marginInner: 15,
backgroundGridHlines: false,
backgroundGridBorder: false,
axes: false,
colors: ['#006'],
xaxisScaleUnitsPost: '%',
xaxisScaleMax: 50,
yaxisLabels:[
'Current account',
'Mortgage',
'Savings/ISAs',
'Mobile phone',
'Internet provider',
'Energy',
'Car insurance'
],
textSize: 16
}
}).wave();
</script>