A HBar chart with a right Y axis
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>
window.onload = function ()
{
var hbar = new RGraph.HBar({
id: 'cvs',
data: [56,45,57,58,51,48,47,46,61],
options: {
labels: ['Venus','Felicity','Cynthia','Frederick','Hoolio','Peter','Jennifer','Richard','Joathan'],
yaxispos: 'right',
gutterLeft: 5,
gutterRight: 75,
xmax: 100,
backgroundGridAutofitNumhlines: 9,
scaleZerostart: true,
textAccessible: true
}
}).draw()
};
</script>
« Back