Add eventData handler to heatmap for proper click event data by nojaf · Pull Request #7686 · plotly/plotly.js · GitHub
Skip to content

Add eventData handler to heatmap for proper click event data#7686

Open
nojaf wants to merge 3 commits into
plotly:masterfrom
nojaf:heatmap-click-event
Open

Add eventData handler to heatmap for proper click event data#7686
nojaf wants to merge 3 commits into
plotly:masterfrom
nojaf:heatmap-click-event

Conversation

@nojaf

@nojaf nojaf commented Jan 13, 2026

Copy link
Copy Markdown

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
Copy Markdown
Collaborator

@nojaf

nojaf commented Jan 16, 2026

Copy link
Copy Markdown
Author

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)

3 participants