plotly / plotly/plotly.js

Mismatched Tooltip Behavior in Heatmap Charts with Line Chart Overlays

Aperta
#7,123 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug P3
Lingua principale
JavaScript
Stelle
18.3k
Fork
2k
Merge medio
2g 12h
PR unite (30g)
28

Descrizione

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:

image

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:

image

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:

  1. Create a heatmap chart with associated data.
  2. Add a line chart overlay to the heatmap chart.
  3. 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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci il caso di heatmap con sovrapposizione di una linea descritto nell’issue usando Plotly.js 2.32.0, quindi esamina la funzione _hover e la relativa chiamata a findHoverPoints. Il lavoro è completato quando trascinando sulla heatmap viene riportato il valore z della heatmap in corrispondenza del cursore invece del punto della linea sovrapposta, e il comportamento è stato verificato rispetto al caso segnalato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript
Ambito
data-visualization
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.