chartjs-custom
v1.0.2
Published
nodejs Chart of Chart.js with private custom. Support show text in Doughnut chart
Maintainers
Readme
chartjs-custom
The fork version of [nChart]
Usage
var Canvas = require('canvas')
, canvas = new Canvas(800, 800)
, ctx = canvas.getContext('2d')
, Chart = require('nchart-custom')
, fs = require('fs');
new Chart(ctx).Doughnut(
[
{
"value": 50,
"color": "#27ae60",
"showCenterText":true,
"showCenterLabel":true,
"label":"Compliance"
},
{
"value": 100,
"color": "#D4CCC5",
"label":"Non-compliance",
"color": "#F7464A"
}
]
, {
scaleShowValues: true,
percentageInnerCutout : 75,
scaleFontSize: 24
}
);
canvas.toBuffer(function (err, buf) {
if (err) throw err;
fs.writeFile(__dirname + '/pie2.png', buf);
});
Installation
$ npm install -g chartjs-customRequired!
Documentation
You can find documentation at Chart.js Doc
Thanks to
- https://github.com/visionmedia
- https://github.com/nnnick
