A suite to track Project Diva score statistics and ratings / D4DJ event data.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
projectdivar/server/node_modules/quickchart-js/examples/to_file_example.js

17 lines
397 B

const fs = require('fs');
const QuickChart = require('../index');
const qc = new QuickChart();
qc.setConfig({
type: 'bar',
data: { labels: ['Hello world', 'Foo bar'], datasets: [{ label: 'Foo', data: [1, 2] }] },
});
qc.setWidth(500).setHeight(300).setBackgroundColor('transparent');
async function saveChart() {
// Write file to disk
await qc.toFile('/tmp/chart.png');
}
saveChart();