We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
As tooltips are triggered on Elements, a hierarchical callback definition could be made - callbacks are called if defined in (in order of preference):
The reasoning behind this feature is that while creating a complex chart with different needs for label formatting, I found myself doing this a lot:
chartOptions = { [...] tooltips: { callbacks: { label: function (tooltip, data) { // real implementation accounts for nonexistent object properties var datasetCallback = data.datasets[tooltip.datasetIndex].tooltips.callbacks.label; if (typeof datasetCallback === 'function') { return datasetCallback(tooltip, data); } return tooltip.yLabel; } } } }
The text was updated successfully, but these errors were encountered:
This seems like an interesting idea. Thoughts @tannerlinsley @derekperkins @zachpanz88 @simonbrunel ?
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
As tooltips are triggered on Elements, a hierarchical callback definition could be made - callbacks are called if defined in (in order of preference):
The reasoning behind this feature is that while creating a complex chart with different needs for label formatting, I found myself doing this a lot:
The text was updated successfully, but these errors were encountered: