Chart.js pie tooltip getting cut

后端 未结 6 540
故里飘歌
故里飘歌 2020-12-29 03:35

I\'m using Chart.js pie chart with tooltips which being cut for some reason.

Screenshot attached, didn\'t found any attribute/option to take care of it..

Is

6条回答
  •  醉梦人生
    2020-12-29 04:13

    You can add internal padding to the chart. For instance in my case I had a cut of tooltips on the right.

                        options: {
                        responsive: true,
                        maintainAspectRatio: false,
                        cutoutPercentage: 60,
                        legend: {
                            display: false
                        },
                        animation: {
                            animateRotate: false
                        },
                        layout: {
                            padding: {
                                right: 40
                            }
                        }
                    }
    

提交回复
热议问题