<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> window.onload = function () { var bar = new RGraph.Bar({ id: 'cvs', data: [4,6,8,4,5,3,7,5,4,9], options: { noaxes: true, ylabels: false, labelsAbove: true, colors: ['blue','blue','blue','blue','blue','red','red','red','red','red'], colorsSequential: true } }).draw(); var xaxes = new RGraph.Drawing.XAxis({ id: 'cvs', y: bar.canvas.height - 30, options: { labels: ['Team A','Team B'], textAccessiblePointerevents: false } }).on('click', function (e, obj) { alert('The X axis has been clicked!'); }).on('mousemove', function (e, obj) { return true }).draw(); }; </script>