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