'hovercompare' modebar button does not retain hovermode y
未关闭
还没有人认领这个 Issue。
bug
P3
- 主要语言
- JavaScript
- 星标
- 18.3k
- 派生
- 2k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 28
描述
MWE:
const data = [
{
x: [1, 2, 3, 4],
y: [10, 15, 13, 17],
type: 'scatter'
},
{
x: [1, 2, 3, 4],
y: [10, 13, 15, 17],
type: 'scatter'
}
];
const layout = {
hovermode: 'y',
modebar: { add: ['hoverclosest', 'hovercompare'] }
};
Plotly.newPlot('myDiv', data, layout);
One might expect that if the hoverclosest button is clicked and then hovercompare after, it should return to the hover comparison by y values, as initially set, but instead, it switches to the default comparison by x values. If there is a workaround, that would also be helpful.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,使用将 hovermode 设置为 y 且启用 hoverclosest 和 hovercompare modebar 按钮的配置,复现所提供的 MWE。跟踪这些按钮如何改变 hovermode,然后验证切换回 hovercompare 时仍按 y 值进行比较,而不是恢复为按 x 值进行比较。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 48/100