fundcharts-node
v0.1.11
Published
(nodejs)lightweight canvas data visualization library. 1.x: line/bar/pie/radar/scatter/kline chart.
Downloads
2
Maintainers
Readme
FundCharts-nodejs
web/weapp/nodejs canvas lite charts library.
Version
0.1.11
Install
npm install --save fundcharts-node
Usage
const fs = require('fs');
const path = require('path');
const Canvas = require('canvas');
const { FundCharts } = require('fundCharts-node');
// chart 1
const chart1 = new FundCharts.line({
id: 'line1',
width: 750,
height: 375,
xaxis: ['07-11', '08-11', '09-11', '09-22', '10-11', '11-11', '12-11'],
data: [1, 2, 3, 4, 3.5, 3, 4],
Canvas: Canvas,
handleOut: canvas => {
let out = fs.createWriteStream(path.join(__dirname, './line1.jpg')),
stream = canvas.createJPEGStream();
stream.on('data', function(chunk) {
out.write(chunk);
});
},
});
chart1.init();
demo
Author
Update time
2022.02.05