A 3D Horizontal Bar chart with a center Y axis
This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.common.dynamic.js"></script>
<script src="RGraph.common.tooltips.js"></script>
<script src="RGraph.hbar.js"></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="600" height="550">[No canvas support]</canvas>
This is the code that generates the chart:
<script>
new RGraph.HBar({
id: 'cvs',
data: [[1,null],[1,2],[5,4],[7,null],[-4,-3],[-8,-8],[4,6]],
options: {
colors: [
'Gradient(#fcc:red:red)',
'Gradient(#cfc:#0f0:#0f0)'
],
grouping: 'grouped',
yaxisPosition: 'center',
variant: '3d',
marginLeft: 100,
shadow: true,
shadowOffsety: 5,
shadowOffsetx: 13,
shadowBlur: 10,
shadowColor: '#ccc',
marginInner: 10,
axes: false,
yaxisLabels: ['Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'],
tooltips: [
'Monday','Monday',
'Tuesday','Tuesday',
'Wednesday','Wednesday',
'Thursday','Thursday',
'Friday','Friday',
'Saturday','Saturday',
'Sunday','Sunday'
],
tooltipsCoordsPage: true
}
}).grow();
</script>