Setting width and height

后端 未结 10 2078
广开言路
广开言路 2020-12-07 19:50

I\'m trying out the example code for Chart.js given in the docs.

Width and height is specified inline on the canvas element at 400px/400px.

But when renderin

10条回答
  •  臣服心动
    2020-12-07 20:27

    You can change the aspectRatio according to your needs:

    options:{
         aspectRatio:4 //(width/height)
    }
    

提交回复
热议问题