Mismatched Tooltip Behavior in Heatmap Charts with Line Chart Overlays
Personne n'a encore pris cette issue.
- Langage dominant
- JavaScript
- Étoiles
- 18.3k
- Forks
- 2k
- Merge moyen
- 2 j 12 h
- PR mergées (30 j)
- 28
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Reproduisez le cas de heatmap avec superposition de courbe décrit dans l’issue avec Plotly.js 2.32.0, puis examinez la fonction _hover et son appel à findHoverPoints. Le travail est terminé lorsque le déplacement sur la heatmap indique la valeur z de la heatmap à la position du curseur plutôt que le point de la courbe superposée, et que le comportement a été vérifié par rapport au cas signalé.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- data-visualization
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100