0.0.1 • Published 6 years ago

dont v0.0.1

Weekly downloads
1
License
Unlicense
Repository
github
Last release
6 years ago

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 x
  • cy - center y
  • ri - inner radius from center (the hole)
  • ro - outer radius from center (the edge)
  • ds - segment starts at degrees
  • de - segment ends at degrees
  • offset - 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

0.0.1

6 years ago

0.0.0

6 years ago