Skip to content

Commit

Permalink
Merge pull request #5852 from plotly/fix-hover-data-key
Browse files Browse the repository at this point in the history
Use ids from axes instead of [object Object] in hover data key
  • Loading branch information
archmoj authored Jul 29, 2021
2 parents 129fc2a + cad132b commit b3bff15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions draftlogs/5852_fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Use ids from axes when making hover data keys [[#5852](https://github.com/plotly/plotly.js/pull/5852)]
2 changes: 1 addition & 1 deletion src/components/fx/hover.js
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ function _hover(gd, evt, subplot, noHoverEvent) {
}

function hoverDataKey(d) {
return [d.trace.index, d.index, d.x0, d.y0, d.name, d.attr, d.xa, d.ya || ''].join(',');
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(',');
}

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

0 comments on commit b3bff15

Please # to comment.