Charts.js sets canvas width/height to 0 and displays nothing

前端 未结 3 1528
眼角桃花
眼角桃花 2021-01-11 09:28

I am trying to use Charts.js to make the default line plot that they show in their example dynamically and put it in a div that I pop up on a user click. My code is like th

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-11 10:06

    In my case the canvas needed to be wrapped inside an element with the CSS display: block;

提交回复
热议问题