A Pie chart with a halo effect
This goes in the documents header:
<script src="RGraph.common.core.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>
labels = [ 'Alvin', 'Pete', 'Luka', 'Hoolio', 'Jack', 'Kev', 'Luis', 'Lou', 'Jesse' ];
pie = new RGraph.Pie({
id: 'cvs',
name: 'cvs',
data: [4,3,2,9,5,1,6,8,4],
options: {
shadow: false,
linewidth: 5,
labels: labels,
labelsSticksColors: '#aaa',
labelsSticksLinewidth: 1
}
}).on('draw', function(obj)
{
RGraph.path2(
obj.context,
'lw 5 b a % % % 0 6.2830 false s white',
obj.centerx,
obj.centery,
obj.radius - 12
);
}).draw();
</script>