g.raphael
g.raphael copied to clipboard
Donut Chart via insideRadius option for Pie Chart
I've added an insideRadius option to g.pie.js, which enables the creation of donut charts. I've also included a few other nice additions...
- opts.insideRadius
- opts.opacity
- opts.sort
The extended repo can be found here: https://github.com/blackwatertepes/g.raphael
Note: insideRadius & opacity will not function properly with pie charts that contain only 1 value
just saying : If you'll draw another small white pie manually (do r.piechart twice...) to create a hole effect (donut) there are no issues with 1 value...
I've found several doughnut plugins or patches for graphael around, but it would be nice if one were included :)