score:0

you can define the desired dimension of your canvas through the width or height property.

<canvas id="chartcontainer" width="400"></canvas>

...or using css.

canvas {
  width: 400px;
}

further you should also define responsive: false and aspectratio: 1 within the chart options, latter represents a square canvas.

options: {
  responsive: false,
  aspectratio: 1,

see configuration options at the chart.js documentation


Related Query

More Query from same tag