A basic example of AJAX and JSON data

Note: For browser security reasons the AJAX demos don't work offline. You can view the demos on the RGraph website here: https://www.rgraph.net/demos/index.html

This is a basic example of using JSON and AJAX. AJAX is used to request the data and it's returned in JSON format. The JSON data is then evaluated and a chart created using it.

[No canvas support]

This goes in the documents header:
<script src="RGraph.common.core.js"></script>
<script src="RGraph.line.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: