create-svg-doughnut
Create a SVG doughnut chart from number array.
Installation
npm install create-svg-doughnut --save
Usage
; const values = 5 10 15;const outerRadius = 100;const innerRadius = 80; // Doughnut with default colorsconst doughnut = ;documentbody; // Doughnut with custom colorsconst palette = '#3cf''#f36''#fc3';const customDoughnut = ;documentbody;
Example HTML output
<!-- Pie with default colors --> <!-- Pie with custom colors -->
Example image output
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.
Release History
- 1.0.1 Fixed error in
Array.prototype.slice: 'this' is null or undefined
in IE11 - 1.0.0 Initial release
Todo
- Create useful tests