chartjs-cli
A command-line tool for creating charts using Chart.js.
Setup and usage
Install chartjs-cli
using npm
:
npm install --global chartjs-cli
This will install the chartjs
tool which is used to create images from Chart.js source files. The basic usage is:
chartjs chart.json chart.png
The chart.json
is the Chart.js options.
Options
There are a number of options to control the output.
format, f
string
Default: png
The format of the image: png
, jpeg
, gif
.
height, h
number
Default: 600
The height of the resulting image in pixel.
width, w
number
Default: 600
The width of the resulting image in pixel.