2 thoughts on “How can I change the background color to the chartArea?

  1. @echavezNS you can write a plugin to do this. The plugin below should work

    Chart.plugins.register({
      beforeDraw: function(chartInstance, easing) {
        var ctx = chartInstance.chart.ctx;
        ctx.fillStyle = 'red'; // your color here
    
        var chartArea = chartInstance.chartArea;
        ctx.fillRect(chartArea.left, chartArea.top, chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);
      }
    });

Comments are closed.