2👍
✅
You defined Options
for Chart.js version 2.x but you most probably use Chart.js version 3.x, that’s why it doesn’t work.
Please take a look at the 3.x Migration Guide in order to find out, what options have changed. In your case, the following points are relevant:
tooltips
namespace was renamed totooltip
to match the plugin name.- Doughnut
cutoutPercentage
was renamed tocutout
and accepts pixels as numer and percent as string ending with%
.
Accordingly, you need to change your Options
as follows:
const Options = {
plugins: {
tooltip: {
enabled: false,
}
},
cutout: '70%',
responsive: true,
maintainAspectRatio: false,
}
Source:stackexchange.com