A Bar chart using AJAX

Summary: RGraph has AJAX functionality that makes integration with your existing scripts easy and painless.

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

[No canvas support]

Here is an example of a 3D variation of the Bar chart which is both animated using the grow() effect and which is also fetching its data via AJAX.

The AJAX script is a simple one that just outputs a sequence of random numbers. You can see the script directly by going here.

If you view the AJAX script you'll see that it just outputs the numbers and nothing else - so no labels or title. So on the chart the labels are just hard coded.

The rest of the configuration is pretty straight-forward - and you can see it below.

When the screen is smaller the canvas dimensions are reduced, the marginInner is reduced and the textSize is reduced as well.

This goes in the documents header:
<script src="RGraph.common.core.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]
This is the code that generates the chart: