0👍
Set the canvas backgrounds to white:
canvas {
background-color: #fff;
}
If that doesn’t work, draw the canvas background in your chart’s plugins
object:
plugins: [
{
id: 'background',
beforeDraw: function(chartInstance) {
var chart = chartInstance.chart;
var ctx = chart.ctx;
ctx.fillStyle = backgroundColor;
ctx.fillRect(0, 0, chart.width, chart.height);
}
}
],
- Chartjs-Who knows why I can't plot my chart properly?
- Chartjs-Chart.js – Multiple bar Charts – Only Show Last Chart
Source:stackexchange.com