chartjs tooltip is cut off when out of canvas [duplicate]
问题 This question already has answers here : Chart.js pie tooltip getting cut (6 answers) Closed 7 hours ago . I'm currently using chartjs (chartjs). Tooltip is cutted, because it go out of canvas. How I can fix this behavior? 回答1: There are multiple ways of solving this. One way (in your case) , you can solve this, is by setting the bottom padding for your chart layout , like so ... options: { layout: { padding: { bottom: 25 //set that fits the best } }, ... } ᴅᴇᴍᴏ var ctx = document