Accepted answer

For rectangular shaped graphs (line, bar) you can include a width and height tag in the html:

<canvas baseChart width="2" height="1"

The width and height set the aspect ratio, not the actual size.

You can do this for square shaped graphs (donut, radar, pie, polar), but it doesn't make as much sense. It will keep a square shape, but with bigger padding on the sides or top and bottom.

Instead, you can set the exact size you want on a div containing the chart:

<div style="display: block; width: 200px; height: 200px;">
    <canvas baseChart

Related Query

More Query from same tag