A Bar chart where only certain bars can be adjusted
This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.common.dynamic.js"></script>
<script src="RGraph.bar.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.Bar({
id: 'cvs',
data: [[1,2,3],[4,5,6],[7,8,9]],
options: {
colors: ['#ddd','#ddd','orange','orange','#ddd','#ddd','#ddd','#ddd','#ddd'],
colorsSequential: true,
adjustable: true,
adjustableOnly: [false,false,true,true,false,false,false,false,false]
}
}).draw();
new RGraph.Bar({
id: 'cvs2',
data: [1,2,3,4,5,6,7,8,9],
options: {
colors: ['#ddd','#ddd','orange','orange','#ddd','#ddd','#ddd','#ddd','#ddd'],
colorsSequential: true,
adjustable: true,
adjustableOnly: RGraph.arrayInvert([false,false,true,true,false,false,false,false,false])
}
}).draw();
</script>
« Back