[BUG]: Return of #3619 - Issue with hovermode default logic for horizontal traces.
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 18.3k
- 派生
- 2k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 28
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从附加的复现文件 "Plotly.js Bug 3619 returns.html" 开始,并比较它在所列版本中的行为。阅读 issue #3619 以及 pull request #3646 中针对早期 hovermode 逻辑的修复。完成标准是:水平散点图和条形图能够选择正确的 hovermode 和 mode-bar 按钮,包括 hovermode 'y'。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100