You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting default options for tooltips, they should be taken into account.
Current Behavior
The custom default options are completely ignored.
Possible Solution
As far as I can tell, it's either just a small overlooked issue on Chart.js's side, or I don't understand how to set these defaults. A possible solution to that would be some more "defaults configuration" examples in the documentation, because tbh this point is a little confusing :)
It is possible, if you change the type to bar it works fine, reason I expect it not working for pie/doughnut charts is that chart.js overrides the default behaviour (can be seen by logging Chart.overrides.doughnut).
Guess it might be better user experience to also override the defaults if a default is set.
@LeeLenaleee has the correct answer. The pie/doughnut charts have overrides which are used first so the default you've specified is not used. I'm not entirely sure what the best fix is here. We could try and make the docs clearer to indicate that overrides are specified. I think it could be surprising if setting global defaults also overrode chart defaults though perhaps we could expose a method that did that for those who wanted it.
Expected Behavior
When setting default options for tooltips, they should be taken into account.
Current Behavior
The custom default options are completely ignored.
Possible Solution
As far as I can tell, it's either just a small overlooked issue on Chart.js's side, or I don't understand how to set these defaults. A possible solution to that would be some more "defaults configuration" examples in the documentation, because tbh this point is a little confusing :)
Steps to Reproduce
http://jsfiddle.net/a40dhzsm/1/
Context
I'm simply trying to add a "%" symbol at the end of tooltip labels.
Environment
The text was updated successfully, but these errors were encountered: