Tooltip in 'x' mode doesn't always show all labels on the same X axis value
See original GitHub issueExpected Behavior
A tooltip must always show labels for all displayed chart datasets.
Current Behavior
Sometimes all labels don’t get displayed in the tooltip.
Label callback doesn’t get invoked for some chart datasets that visible on chart (blue and pink).
Possible Solution
The datasets may get filtered out for tooltip labels callback based on some unknown condition. This should be fixed to always invoke label callback for each of the chart dataset.
Steps to Reproduce
- Set a tooltip
mode
to'x'
andintersect
tofalse
- Add a
label
callback to the tooltipcallbacks
to render the labels - Hover over the chart at different x points.
label
callback sometimes doesn’t get triggered for certain datasets at different x points so the labels don’t get rendered to the tooltip
Context
User should be able to see all dataset labels hovering at any chart x.
Environment
- Chart.js version: 2.9.20
- Browser name and version: Chrome 84.0.4147.135 (Official Build) (64-bit)
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Chart.js - Hover labels to display data for all data points on x ...
What I'd like is the following: when you hover anywhere on the chart, it will display the labels + values for all data...
Read more >chart.js tooltip for x axis values - MSDN - Microsoft
I'm trying to display part of the string on x axis label points on bar chart using chart.js if string is longer than...
Read more >Tooltips are not showing on Line Chart
Hi! It is like you are showing right there. There are two reason when you can't see your value in tooltip. The first...
Read more >Tooltip - Chart.js
Name, Type, Default, Description. enabled, boolean, true, Are on-canvas tooltips enabled? external, function, null, See external tooltip ...
Read more >Create Views for Tooltips (Viz in Tooltip) - Tableau Help
As you craft views and look for ways to reveal more details about data to your audience, you can embed visualizations within tooltips—also...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Speculative the hover mode is configured independently from the tooltip mode. See https://jsfiddle.net/2qt6dncz/
I have this issue currently with an enterprise solution my dev team is building. I’ll work on a reproduction and get back to you guys.