DmitryBaranovskiy / g.raphael

Charts for Raphaël
http://g.raphaeljs.com/
1.51k stars 435 forks source link

Donut Chart via insideRadius option for Pie Chart #157

Open blackwatertepes opened 12 years ago

blackwatertepes commented 12 years ago

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...

  1. opts.insideRadius
  2. opts.opacity
  3. 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

vedmack commented 12 years ago

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...

singpolyma commented 10 years ago

I've found several doughnut plugins or patches for graphael around, but it would be nice if one were included :)