This is a demo of a Scatter chart with an X axis scale. The scale has a minimum value set so it doesn't begin at zero. The scale also has units appended to the numbers.
This goes in the documents header:<script src="RGraph.svg.common.core.js"></script> <script src="RGraph.svg.scatter.js"></script>Put this where you want the chart to show up:
<div style="width: 700px; height: 250px" id="chart-container"></div>This is the code that generates the chart:
<script> data = [ {x:156,y:5},{x:133,y:6},{x:451,y:6}, {x:121,y:6},{x:181,y:5},{x:142,y:4}, {x:183,y:5},{x:165,y:6},{x:138,y:7}, {x:116,y:6},{x:102,y:4},{x:153,y:5} ]; scatter = new RGraph.SVG.Scatter({ id: 'cc', data: data, options: { xaxisScale: true, xaxisScaleUnitsPost: 'Kg', xaxisScaleMin:100, xaxisScaleMax: 200, yaxis: false, backgroundGridVlines: false, backgroundGridBorder: false } }).draw(); </script>