https://github.com/tfwright/adjustable-pie-chart
An adjustable pie chart with Raphaël.js
https://github.com/tfwright/adjustable-pie-chart
Last synced: 4 months ago
JSON representation
An adjustable pie chart with Raphaël.js
- Host: GitHub
- URL: https://github.com/tfwright/adjustable-pie-chart
- Owner: tfwright
- Created: 2010-12-10T23:02:34.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2010-12-13T00:40:35.000Z (over 15 years ago)
- Last Synced: 2025-10-01T04:33:12.585Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 125 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a pure Javascript library for creating pie charts that can be adjusted on the fly.
### Syntaxt
// piechart(centerX, centerY, radius, values, options)
r = Raphael(0, 0, 500, 500)
chart = r.piechart(250, 250, 100, [10, 22, 32, 2, 18], {color:"blue"})
See test.html for full example
### Options
Currently supported:
1. color: the base color for the chart
2. onchange: a function for the chart to call when it is adjusted
Obviously, a work in progress, and still a bit buggy. Needless to say, bug reports/pull requests welcome.
Loosely based on Dmitry Baranovskiy's examples [here](http://raphaeljs.com/pie.html), [here](http://raphaeljs.com/growing-pie.html) and [here](http://g.raphaeljs.com/piechart2.html).