3 thoughts on “Canvas background color

  1. @PaulieScanlon the issue is that the canvas defaults to a transparent background.

    In your codepen, I added the following before the chart is created and it worked just fine.

    Chart.plugins.register({
      beforeDraw: function(chartInstance) {
        var ctx = chartInstance.chart.ctx;
        ctx.fillStyle = "white";
        ctx.fillRect(0, 0, chartInstance.chart.width, chartInstance.chart.height);
      }
    });

Comments are closed.