Pie with flexible segments.
var pie = new Pie;
document.body.appendChild(pie.el);
pie.segments(2);
pie.colors("#58c23c", "#ef0d2b").blank("#cfd4d8");
pie.font("14px 'Helvetica Neue', sans-serif");
pie.update(150, 100);
Change the number of segments to n
.
Change the pie diameter to n
, defaults to 137.
Set color of segments.
Set default color of segment.
Set fill
color of the centered circle.
Change the font to family
.
Update values of segments and animate them.
Redraw Pie
. Useful if you have made any styling changes.
MIT