plotly / plotly/plotly.js

Mismatched Tooltip Behavior in Heatmap Charts with Line Chart Overlays

Abierto
#7,123 0 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

bug P3
Lenguaje dominante
JavaScript
Estrellas
18.3k
Forks
2k
Merge medio
2 d 12 h
PR fusionados (30 d)
28

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Reproduce el caso de heatmap con superposición de línea descrito en el issue usando Plotly.js 2.32.0 y, después, inspecciona la función _hover y su llamada a findHoverPoints. Se considerará terminado cuando, al arrastrar sobre la heatmap, se informe del valor z de la heatmap en la posición del cursor en lugar del punto de la línea superpuesta, y el comportamiento se haya comprobado con respecto al caso reportado.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript
Área
data-visualization
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.