-
Notifications
You must be signed in to change notification settings - Fork 12k
Closed
Labels
Description
Expected behavior
As stated in the documentation here, we should be able to set global overrides for the tooltips.
In v3, I could globally disable the tooltips using the following:
import { Chart } from 'chart.js';
Chart.overrides.doughnut.plugins.tooltip.callbacks.label = () => null;Current behavior
When using the code above, I get the following error: Cannot read properties of undefined (reading 'callbacks')
When outputting the content of Chart overrides in the console, I see this:
{
"bar": { ... },
"bubble": { ... },
"doughnut": {
"aspectRatio": 1,
"plugins": {
"legend": {
"labels": {}
}
}
},
...
}
Which suggests the documentation is wrong ?
Reproducible sample
https://codepen.io/lamasse/pen/WNKLbeV
Optional extra steps/info to reproduce
Please open the console in the codepen to see the issue
Possible solution
It might be a documentation issue only.
Context
No response
chart.js version
v4.2.0
Browser name and version
Chrome 109
Link to your project
No response