dont
v0.0.1
Published
svg donuts
Downloads
5
Readme
dont
make svg donuts with js.
methods
dont.segment(cx, cy, ri, ro, ds, de[, offset])
draws a donut segment, returns an svg path;
cx
- center xcy
- center yri
- inner radius from center (the hole)ro
- outer radius from center (the edge)ds
- segment starts at degreesde
- segment ends at degreesoffset
- degrees offset; shift the start of the donut circle
dont.rad(degrees[, offset])
converts degrees to radians, with an offset of degrees
dont.area(ri, ro, ra)
calculates and returns the radius from center for a segment area to be in proportion to the area of the whole segment. if you want a comparable areas instead of comparable radii. the area of the hole is taken into account.
(send a pull request if you get what i mean and can explain it more eloquent).
ri
- inner radius from center (the hole)ro
- outer radius from center (the edge)ra
- ratio of area in relation to total segment area
dont.draw(data [, options])
to be implemented