Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add eventData handler to heatmap for proper click event data
  • Loading branch information
nojaf committed Jan 13, 2026
commit 04e612b2b9bba75b8eab0dcdc7d340fcdcaf4728
11 changes: 11 additions & 0 deletions src/traces/heatmap/event_data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
'use strict';

module.exports = function eventData(out, pt) {
// Standard cartesian event data
if('xLabelVal' in pt) out.x = pt.xLabelVal;
if('yLabelVal' in pt) out.y = pt.yLabelVal;
if(pt.xa) out.xaxis = pt.xa;
if(pt.ya) out.yaxis = pt.ya;
if(pt.zLabelVal !== undefined) out.z = pt.zLabelVal;
return out;
};
1 change: 1 addition & 0 deletions src/traces/heatmap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = {
colorbar: require('./colorbar'),
style: require('./style'),
hoverPoints: require('./hover'),
eventData: require('./event_data'),

moduleType: 'trace',
name: 'heatmap',
Expand Down