Chart.js legend took up too much spaces

后端 未结 5 2035
执笔经年
执笔经年 2020-12-10 15:27

I was having some problem with chart.js legend. The legend with long text took up too much spaces which resulting in the reduce in the size of my pie chart:

Another

5条回答
  •  被撕碎了的回忆
    2020-12-10 15:45

    This post is 9 months old but for the ones who are looking for a solution, use the following and this will make the pie/doughnut bigger in mobile/responsive view

    Chart.defaults.global.maintainAspectRatio = false;

提交回复
热议问题