score:3

without seeing your code for creating the chart it's only possible to guess at what the problem might be.

generally speaking if you disable the legend and the title the chart should fill to the edge of the canvas, like so:

new chart(
  document.getelementbyid('doughnut-canvas'),
  {
    type: 'doughnut',
    data: {
      datasets: [{
        data: [2, 1],
      }]
    },
    options: {
      legend: {
        display: false
      },
      title: {
        display: false
      }
    }
  }
);
body {
  background-color: #000;
}
.header {
  color: white;
  font-size: 16px;
  font-weight: bold;
  font-size: verdana;
  padding-left: 10px;
}

.doughnut-canvas-container {
  width: 30%;
}

#doughnut-canvas {
  background-color: red;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/chart.js/2.7.2/chart.min.js"></script>
<p class="header">cpu</p>
<div class="doughnut-canvas-container">
  <canvas id="doughnut-canvas" class="chartjs-render-monitor"></canvas>
</div>


Related Query

More Query from same tag