I have a modal window:
<div class="modal" id="last" style="display: none"> <canvas id="gg" width="372px" height="144px"/> </div>
If I run it, the canvas will be empty. But you just have to remove style = "display: none", as the canvas draws, in general, I need the canvas to be drawn in my modal window.