By using a large chart.radius setting the Pie will be too large for the canvas and you'll get a rectangular Pie chart effect.
This goes in the documents header:<script src="RGraph.common.core.js"></script> <script src="RGraph.common.key.js"></script> <script src="RGraph.common.effects.js"></script> <script src="RGraph.pie.js"></script>Put this where you want the chart to show up:
<canvas id="cvs" width="350" height="250">
[No canvas support]
</canvas>
This is the code that generates the chart:
<script>
window.onload = function ()
{
var pie = new RGraph.Pie({
id: 'cvs',
data: [4,8,4,6,5,3,2,5],
options: {
radius: 350,
key: ['Alvin','Pete','Hoolio','Jack','Kev','Luis','Lou','Jesse'],
strokestyle: 'white',
linewidth: 3,
textSize: 14,
textAccessible: true
}
}).draw()
if (RGraph.ISIE9UP || RGraph.ISCHROME) {
pie.roundRobin();
pie.implode();
} else if (RGraph.ISOLD) {
pie.draw()
} else {
pie.grow();
}
};
</script>