0👍
✅
Guessing that you’re using Chart.js v3, be aware that the tooltips are defined in the namespace options.plugins.tooltip
but not options.tooltips
as in your code. Therefore chartOptions
needs to be changed as follows:
const chartOptions = {
responsive: true,
maintainAspectRatio: false,
cutout: "64%",
plugins: {
tooltip: {
backgroundColor: "#227799"
}
}
};
For further information, please consult Tooltip Configuration from the Chart.js documentation.
Source:stackexchange.com