A jQuery plugin which makes pie drawing + animating easy as a pie
Include the script after the jQuery library:
<script src="/path/to/jquery.nicepie.min.js"></script>
http://dranax.github.io/nicepie/
In your HTML document insert a div
<div id="my_pie"></div>
Then use nicepie:
$('#my_pie").nicepie(options);
##Options
name | type | explaination | default value |
---|---|---|---|
radius | integer | radius of the pie (half the width/height of canvas | 100 |
backcolor | color | color of the background circle | #000 |
piecolor | color | color or the foreground arc, if drawn | #666 |
fontcolor | color | text color | #fff |
font | font | font of the drawn text | 20pt Ubuntu italic |
halign | center | left | right | horizontal text alignment | center |
valign | middle | top | bottom | vertical text alignment | middle |
suffix | string | string to add at the end of text | |
show_percent | boolean | if true, a foreground arc will be drawn. start value must be 100, end value between 100 and 0 |
true |
start | integer | starting number value | 100 |
end | integer | ending number value | 43 |
step | integer | increase / decrease step | -1 |
interval | integer | animation interval in ms | 10 |
Licensed under the MIT License license.