JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10
  • Score
    100M100P100Q34420F
  • License MIT

In browser NodeJs data visualisation in seconds

Package Exports

  • quickchart

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (quickchart) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

QuickChart

Ever wanted to visualize a dataset in a chart in seconds in a node app? Search no further!

QuickChart quickly opens a minimalistic no-dependances node server and displays a chart js graph on your fav' browser.

Installation

npm i quickchart

Usage

quickchart(chart, [options])

const quickchart = require('quickchart')

quickchart({
    // chartJs object
}, {
    // options
    port: 8001, // Port to open - default value = 8001
    callback: (error) => {} // optional callback when server is up or fails - default is console.log / console.error
})

Example

const quickchart = require('quickchart')

quickchart({
    type: 'bar',
    data: {
        labels: ['A', 'B', 'C'],
        datasets: [{
            label: 'Data',
            backgroundColor: 'rgb(255, 0, 0)',
            data: [42, 69, 10]
        }]
    },
})
=> QuickChart is running on 127.0.0.1:8001

License

MIT © Ivan Sedletzki - Please use and share at will

Special thanks to Dinesh Pandiyan for npm-module-boilerplate