A basic Pie chart
Summary: A basic Pie chart which has a large first segment and which uses the roundRobin() effect. The curvy sticks for labels are now the default (they didn't used to be).
A simple Pie chart that shows off the label sticks to good effect. As far as the Pie chart itself goes there's not a whole lot to it - the tooltips and labels both use the same array (which is defined just above the chart itself).
The shadow is turned off (set to a transparent color) and the stroke color is also set to
transparent. The Pie chart also uses the
roundRobin() animation effect.
With smaller screens the labels are disabled and a key is used instead. This takes up a little extra space so that the chart fits better in the available space.
This goes in the documents header:
<script src="RGraph.common.core.js"></script> <script src="RGraph.common.dynamic.js"></script> <script src="RGraph.common.tooltips.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: