Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nojaf wants to merge 3 commits into plotly:master
base: master
Choose a base branch
Loading
from nojaf:heatmap-click-event

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]

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

Reviewers

@alexcjohnson alexcjohnson Awaiting requested review from alexcjohnson

At least 1 approving review is required to merge this pull request.

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

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

AltStyle によって変換されたページ (->オリジナル) /