1.0.3 • Published 6 years ago

svg-charts v1.0.3

Weekly downloads
25
License
MIT
Repository
-
Last release
6 years ago

svg-charts

Library that gives you possibility to draw pie charts in svg.

Installation via npm

  • Install node
  • run npm install svg-charts

Installation from repo

  • Clone repo git clone https://github.com/arekgofi/svg-charts.git
  • Install node
  • run npm install

Usage

  • import
    import svgCharts from 'svg-charts
    var svgc = svgCharts()
    svgc.generatePieChartSVG(values,colors,radius,strokeSize,strokeColor);

  • script
    <script src="build/index.js"></script>
    var svgc = svgCharts()
    svgc.generatePieChartSVG(values,colors,radius,strokeSize,strokeColor);

Examples

Draw pie charts on google maps

  • cd examples\google-maps
  • open index.html in your browser

Just draw pie charts

  • cd examples\just-pie-chart
  • open index.html in your browser

API

generatePieChartSVG

Returns pie chart svg node
Params:
@param {number[]} values
@param {string[]} colors
@param {number} radius
@param {number} strokeSize=0
@param {string} strokeColor="white"

1.0.3

6 years ago

1.0.2

6 years ago

1.0.0

6 years ago