echarts-svg

0.0.6 • Public • Published

echarts-svg

Output echarts svg image on node enviroment.

Required:

Node >= v12.16.1

Usage:

const chart = require('echarts-svg').create({
    // svg font size
    fontSize: '12px',
    // render mode
    // default: use global document to init echarts
    // thread: use workthread to isolate echarts global context
    mode: 'default'
});
chart.render({
    color: ['#80FFA5', '#00DDFF', '#37A2FF', '#FF0087', '#FFBF00'],
    title: {
        text: 'chart title'
    },
    //... echartOption
}, {
    width: 800,
    height: 600
})
    .then(svgText => {
        console.log(svgText)
    });

Readme

Keywords

none

Package Sidebar

Install

npm i echarts-svg

Weekly Downloads

1

Version

0.0.6

License

MIT

Unpacked Size

12.7 kB

Total Files

5

Last publish

Collaborators

  • kekee000