An SVG Pie chart using the AJAX functions

A Pie chart making use of the RGraph.SVG.AJAX.getJSON() function to get data via AJAX. The chart is using the exploded option and has a shadow enabled. It's animated using the roundRobin() effect.

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#svg

This goes in the documents header:
<script src="RGraph.svg.common.core.js"></script>
<script src="RGraph.svg.common.ajax.js"></script>
<script src="RGraph.svg.pie.js"></script>
Put this where you want the chart to show up:
<div style="width: 650px; height: 350px" id="chart-container"></div>
    [No canvas support]
</div>
This is the code that generates the chart:
<script>
    RGraph.SVG.AJAX.getJSON('/getdata.html?json', function (json)
    {
        var obj = new RGraph.SVG.Pie({
            id: 'chart-container',
            data: json.data,
            options: {
                labels: json.labels,
                exploded: 10,
                shadow: true
            }                    
        }).roundRobin();
    });
</script>