[BUG]: Return of #3619 - Issue with hovermode default logic for horizontal traces.
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
I reported back in 2019 issue #3619 which was fixed in #3646 (v1.45.3) We have been using v1.47.4 until recently when we moved to v2.35.3 (latest at the time). I had to add v1hovermode to the mode bar to get the to hover/comparison buttons back but discovered that the issue with hovermode behaviour with horizontal scatter based charts has returned and also seems to affect bar charts too now:
The compare mode bar button behaviour is for 'x' axis rather than even when you set all the traces to horizontal (orientation of 'h').
If you set the traces as horizontal the Mode Bar and set the hovermode to 'y' the button is unselected (so is the closest button) even though the expected 'y' hovermode behaviour occurs when hovering.
I have grabbed my example page from #3619 and updated it by adding in v1hovermode and some more scatter chart variants. The first chart is still the stacked bar chart that now doesn't work anymore, the last is still the scatter chart with my workaround. The other three show the incorrect behaviour.
Plotly.js Bug 3619 returns.html
I tested it with various versions here are my results:
v1.58.4 (last v1.x.x) - Pass
v2.0.0 - Fail
v2.35.3 - Fail
v3.3.0 - Fail
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached "Plotly.js Bug 3619 returns.html" reproduction and compare its behavior across the listed versions. Read issue #3619 and the fix in pull request #3646 for the earlier hovermode logic. Done means horizontal scatter and bar charts select the correct hovermode and mode-bar buttons, including hovermode 'y'.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100