pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/plotly/plotly.js/pull/7686

f="https://github.githubassets.com/assets/actions-0e714a98ea09295a.css" /> 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 intoplotly:masterfrom
nojaf:heatmap-click-event
Open

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

Conversation

@nojaf
Copy link
Copy Markdown

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

@nojaf
Copy link
Copy Markdown
Author

nojaf commented Jan 16, 2026

Hi @alexcjohnson,

I've been investigating further and I'm no longer sure the problem is in Plotly. It might be in the Marimo integration layer. I tried reproducing the issue with raw Plotly and react-plotly, but couldn't recreate what I see in Marimo notebooks.

I'll keep digging. If you don't hear from me within a week, feel free to close both the PR and the issue.

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

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy