jskit-plot

1.2.0 • Public • Published

jskit-plot

Coverage Status Build Status

Description

JSkit-plot is a javascript module for quickly plotting data with highcharts. JSkit-plot can be used with ML.js and jskit-learn to suppliment a JavaScript data science toolchain.

Installation

$ npm i jskit-plot

Full Documentation

Usage (basic)

"jskit-plot" : { 
  getFileExtension: [Function: getFileExtension], //returns extension from filepath
  plot: [async Function: plot], //generates svg,png,jpg and pdf image of chart
}

Quick Example

sample data plot

import * as jskp from 'jskit-plot';
 
const chartData = {
  title: {
    text: 'My Chart',
  },
  xAxis: {
    categories: ['Jan', 'Feb', 'Mar', 'Apr', ],
  },
  series: [
    {
      type: 'line',
      data: [1, 3, 2, 4,],
    },
    {
      type: 'line',
      data: [5, 3, 4, 2,],
    },
  ],
};
 
//In JavaScript, by default most I/O Operations are asynchronous, see the notes section for more
jskp.plot({
  filename:'',
  chart:chartData,
})
  .then(()=>{
    //chart generated
  })
  .catch(console.error);
 
// or from URL
 

Testing

$ npm i
$ grunt test

Contributing

Fork, write tests and create a pull request!

Development

Note Make sure you have grunt installed

$ npm i -g grunt-cli jsdoc-to-markdown

For generating documentation

$ grunt doc
$ jsdoc2md src/**/*.js  > docs/api.md

License

MIT

Package Sidebar

Install

npm i jskit-plot

Weekly Downloads

2

Version

1.2.0

License

MIT

Last publish

Collaborators

  • yawetse