3👍
✅
Your code is fine, simply include the canvas
into a div
and it will display.
<div>
<canvas id="myChart" width="400" height="400"></canvas>
</div>
Please have a look at the following StackBlitz
Source:stackexchange.com