Chart.defaults.plugins.tooltip.callbacks.label global definition is possible? #9357
Answered
by
LeeLenaleee
lucapollani
asked this question in
Q&A
-
Here is an example: Is it possible to do something like this to apply to any tooltip? Chart.defaults.plugins.tooltip.callbacks.label = (context) => {
console.log(context);
return `test ${context.label}: ${context.parsed}`;
}; |
Beta Was this translation helpful? Give feedback.
Answered by
LeeLenaleee
Jul 5, 2021
Replies: 1 comment 9 replies
-
Pie charts override the normal default for the tooltip thats why its not working, if you change it to a line chart for example it works fine: https://jsfiddle.net/Leelenaleee/c5npL7b1/3/ |
Beta Was this translation helpful? Give feedback.
9 replies
Answer selected by
lucapollani
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pie charts override the normal default for the tooltip thats why its not working, if you change it to a line chart for example it works fine: https://jsfiddle.net/Leelenaleee/c5npL7b1/3/