plotly / plotly/plotly.js

Mismatched Tooltip Behavior in Heatmap Charts with Line Chart Overlays

Offen
#7,123 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug P3
Vorherrschende Sprache
JavaScript
Sterne
18.3k
Forks
2k
Ø Merge
2 T. 12 Std.
Gemergte PRs (30 T.)
28

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere den im Issue beschriebenen Heatmap- und Linien-Overlay-Fall mit Plotly.js 2.32.0 und untersuche anschließend die Funktion _hover und ihren Aufruf von findHoverPoints. Erledigt ist die Aufgabe, wenn das Ziehen über die Heatmap den z-Wert der Heatmap an der Cursorposition statt des Punkts der überlagerten Linie meldet und das Verhalten anhand des gemeldeten Falls überprüft wurde.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript
Bereich
data-visualization
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.