By using the gutter settings to shift the charts left or right, two Bipolar charts can be made to give an inverted appearance.
This goes in the documents header:<script src="RGraph.common.core.js"></script> <script src="RGraph.bipolar.js"></script>Put this where you want the chart to show up:
<canvas id="cvs" width="600" height="250">
[No canvas support]
</canvas>
This is the code that generates the chart:
<script>
new RGraph.Bipolar({
id: 'cvs',
left: [4,6,3,5,8],
right: [4,6,5,9,2],
options: {
colors: ['#7CB5EC'],
labels: ['John','Luke','Pete','Jane','Fred'],
noaxes: true,
gutterLeft: -225,
gutterRight: 325,
gutterCenterAutosize: false,
gutterCenter: 75,
textAccessibleOverflow: 'hidden'
}
}).grow();
new RGraph.Bipolar({
id: 'cvs',
left: [4,6,3,5,8],
right: [4,6,5,9,2],
options: {
labels: ['John','Luke','Pete','Jane','Fred'],
scaleZerostart: true,
noaxes: true,
gutterLeft: 325,
gutterRight: -230,
textAccessible: true,
textAccessibleOverflow: 'hidden',
colors: ['#7CB5EC']
}
}).grow();
</script>