We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 741ce17 + 4fabee3 commit 0e4e1d5Copy full SHA for 0e4e1d5
inst/htmlwidgets/plotly.js
@@ -243,13 +243,15 @@ HTMLWidgets.widget({
243
var gd = document.getElementById(el.id);
244
var trace = gd.data[pt.curveNumber];
245
246
- // Add other attributes here, if desired
+ // Heatmap z event data should derive from _z calc attribute
247
+ // https://github.com/ropensci/plotly/issues/1141
248
+ var z = trace.type === "heatmap" ? "_z" : "z";
249
if (!trace._isSimpleKey) {
- var attrsToAttach = ["key", "z"];
250
+ var attrsToAttach = ["key", z];
251
} else {
252
// simple keys fire the whole key
253
obj.key = trace.key;
- var attrsToAttach = ["z"];
254
+ var attrsToAttach = [z];
255
}
256
257
for (var i = 0; i < attrsToAttach.length; i++) {
0 commit comments