Mismatched Tooltip Behavior in Heatmap Charts with Line Chart Overlays
还没有人认领这个 Issue。
- 主要语言
- JavaScript
- 星标
- 18.3k
- 派生
- 2k
- 平均合并
- 2 天 12 小时
- 30 天内合并 PR
- 28
描述
Issue Description:
When using a heatmap chart in Plotly.js, the tooltip functionality displays the "z" heatmap value corresponding to the "x" and "y" coordinates of the cursor when dragging over the chart:
However, when a line chart is drawn over the heatmap, the tooltip displays the "z" heatmap value corresponding to the point on that line instead of the heatmap data:
Expected Behavior:
The tooltip should display the "z" value from the heatmap data when dragging over the heatmap chart, even if other types of charts (like line charts) are present on the same plot.
Investigation Findings:
Upon further investigation, it was discovered that the findHoverPoints function inside Plotly's _hover function needs to be called without the winX and winY arguments (or they should be ignored) for this functionality to work as expected.
Steps to Reproduce:
- Create a heatmap chart with associated data.
- Add a line chart overlay to the heatmap chart.
- Hover the cursor over the heatmap and observe the tooltip data.
Additional Inquiry:
- Could you please confirm if the tooltip behavior change when a line chart is present on the heatmap was intentional?
- If this change was deliberate, could you provide insights or documentation on the reasoning behind this decision?
- Is there any API or configuration option to customize the tooltip behavior based on the chart layers present?
Additional Information:
- Plotly.js version: plotly.js-cartesian-dist, version: 2.32.0
- Browser: Chrome Version 127.0.6533.88 (Official Build) (64-bit)
This issue affects the ability to accurately view data in complex charts with multiple layers. Any insights or resolution steps would be greatly appreciated. Thank you for your attention to this matter.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用 Plotly.js 2.32.0 重现 issue 中描述的热力图和线条叠加案例,然后检查 _hover 函数及其对 findHoverPoints 的调用。完成标准是:在热力图上拖动时,报告光标位置处的热力图 z 值,而不是叠加线的点,并根据报告的案例检查该行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100