pure-js-chart
pure js line-chart render to png ,no canvas or any browser apis, all in javascript
纯粹使用js实现的一个线形图表,可以直接输出png,不使用canvas或者其他浏览器接口,只有js
usage
const chart = require('./chart').create({width: 500, height: 200});
let datas = [24, 57, 70, 100, 130, 120, 110, 170, 160, 110];
let pngArrayBuffer = chart.draw(datas);
require('fs').writeFileSync('output.png', Buffer.from(png));
let dataURL = 'data:image/png;base64,' + Buffer.from(pngArrayBuffer).toString('base64');
thanks to
author
https://github.com/play175/pure-js-chart