6👍
You are using 2.5.0, which has bug. Update to latest 2.8.0, its working fine already. https://jsfiddle.net/zhuhang95/utc9wenx/4/
Usually, using titleAlign
and bodyAlign
should do the trick.
Chart.js docs: https://www.chartjs.org/docs/latest/configuration/tooltip.html#alignment
options: {
tooltips: {
titleAlign: 'center',
bodyAlign: 'center'
}
}
- [Chartjs]-Ng2-Charts Linechart only showing first 2 two values
- [Chartjs]-How set color family to pie chart in chart.js
0👍
Your align properties
were messing things up.
Give this a try:
- [Chartjs]-How to add text in centre of the doughnut chart using Chart.js?
- [Chartjs]-Chart.js pie tooltip getting cut
Source:stackexchange.com