dont

0.0.1 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i dont

Weekly Downloads

3

Version

0.0.1

License

Unlicense

Unpacked Size

3.41 kB

Total Files

3

Last publish

Collaborators

  • yetzt