Nocturnal Practitioners of Magic
    Have ideas to improve npm?Join in the discussion! »

    svg-charts

    1.0.3 • Public • Published

    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"]

    Install

    npm i svg-charts

    DownloadsWeekly Downloads

    27

    Version

    1.0.3

    License

    MIT

    Last publish

    Collaborators

    • avatar