3👍
✅
Just extend Chart.js to do this, like so
Chart.types.Line.extend({
name: "LineAlt",
draw: function () {
Chart.types.Line.prototype.draw.apply(this, arguments);
var ctx = this.chart.ctx;
ctx.globalCompositeOperation = 'destination-over';
ctx.fillStyle = 'rgba(0,0,255,0.2)';
ctx.fillRect(0, 0, this.chart.width, this.chart.height);
ctx.globalCompositeOperation = 'source-over';
}
});
and then
...
new Chart(ctx).LineAlt(data);
Fiddle – http://jsfiddle.net/q7v5qzzg/
0👍
scaleGridLineColor : “rgba(0,0,0,0)”
pass this as one of the configuration values
Source:stackexchange.com