39👍
To hide the title of tooltip, you need to return an empty function on tooltips title‘s callback, like so …
options: {
tooltips: {
callbacks: {
title: function() {}
}
},
...
}
8👍
To hide the tooltip title/label, it should be added in the options object for that chart as follows:
options: {
plugins: {
tooltip: {
callbacks: {
title : () => null // or function () { return null; }
}
}
}
}
Do refer to the documentation to understand better that it should be handled with a custom callback function, and it is not a config that can be set in options directly. https://www.chartjs.org/docs/latest/configuration/tooltip.html#tooltip-callbacks
I’ve mentioned the same in this other thread : https://stackoverflow.com/a/68033933/8578337
0👍
According to the Chart.js 4.3.1 documentation for Tooltip Callbacks:
If the callback returns undefined, then the default callback will be used. To remove things from the tooltip callback should return an empty string.
{
options: {
plugins: {
tooltip: {
// ...other options
callbacks: {
title: () => ''
}
}
}
}
}