0👍
✅
The solution I am using is to create my fixed size canvas in the DOM but I position it outside of the visible screen.
Basically I put the canvas I want to use to render an image out of it inside the following div
<div style="position: absolute; left: -2000px">
<canvas id="canvasIwantToRenderForTheBackend" <!-- here go all the attrs I want to use for this canvas--> ></canvas>
</div>
This way chartjs gets forced to actually render the chart into that canvas.
Source:stackexchange.com