Skip to content

Conversation

@nojaf
Copy link

@nojaf nojaf commented Jan 13, 2026

Fixes #7685

This PR adds an eventData handler to the heatmap trace module, enabling proper plotly_click event data with x, y, and z values.

Also fixes a bug in hover.js where category axis labels were incorrectly returning numeric boundary values instead of the actual category labels.

Changes:

  • src/traces/heatmap/index.js - Register the eventData handler
  • src/traces/heatmap/event_data.js - New file implementing the event data extraction
  • src/traces/heatmap/hover.js - Fix category axis label lookup to use `xa._categories[nx]

@alexcjohnson
Copy link
Collaborator

Thanks @nojaf - your fix looks plausible, though I'm a little surprised this hasn't come up before. Can you make one or two standalone examples (in codepen preferably) that show the bugs this fixes? Then we can swap between using the latest release version and the build from your PR, which is available as a CI artifact here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add plotly_heatmapclick event (similar to plotly_treemapclick / plotly_sunburstclick)

2 participants