An example of the drawing API X axis (with a scale)
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.drawing xaxis.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>
bar = new RGraph.Bar({
id: 'cvs',
data: [4,8,6,4,3,5,8],
options: {
axes: false
}
}).draw();
xaxis = new RGraph.Drawing.XAxis({
id: 'cvs',
y: bar.canvas.height - 35,
options: {
xaxisLabels: ['Mon','Tue','Wed','Thu','Fri','Sat','Sun']
}
}).draw();
</script>