Skip to content

Commit b3bff15

Browse files
authored
Merge pull request #5852 from plotly/fix-hover-data-key
Use ids from axes instead of [object Object] in hover data key
2 parents 129fc2a + cad132b commit b3bff15

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: draftlogs/5852_fix.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Use ids from axes when making hover data keys [[#5852](https://github.com/plotly/plotly.js/pull/5852)]

Diff for: src/components/fx/hover.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ function _hover(gd, evt, subplot, noHoverEvent) {
805805
}
806806

807807
function hoverDataKey(d) {
808-
return [d.trace.index, d.index, d.x0, d.y0, d.name, d.attr, d.xa, d.ya || ''].join(',');
808+
return [d.trace.index, d.index, d.x0, d.y0, d.name, d.attr, d.xa ? d.xa._id : '', d.ya ? d.ya._id : ''].join(',');
809809
}
810810

811811
var EXTRA_STRING_REGEX = /<extra>([\s\S]*)<\/extra>/;

0 commit comments

Comments
 (0)