8000 Fixup hover on period positioned points by archmoj · Pull Request #5618 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Fixup hover on period positioned points #5618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
May 13, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Faile 8000 d to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
filter seen traces in period hovers
  • Loading branch information
archmoj committed May 6, 2021
commit 543698a8b097f576f326f8964227e2c620bcac6c
15 changes: 12 additions & 3 deletions src/components/fx/hover.js
Original file line number Diff line number Diff line change
Expand Up @@ -685,9 +685,18 @@ function _hover(gd, evt, subplot, noHoverEvent) {
findHoverPoints(customXVal, end);
}

// remove non-period aditions
for(var k = hoverData.length - 1; k >= initLen; k--) {
if(!hoverData[k].trace[axLetter + 'period']) {
var k;
var seen = {};
for(k = 0; k < initLen; k++) {
seen[hoverData[k].trace.index] = true;
}

// remove non-period aditions and traces that seen before
for(k = hoverData.length - 1; k >= initLen; k--) {
if(
seen[hoverData[k].trace.index] ||
!hoverData[k].trace[axLetter + 'period']
) {
hoverData.splice(k, 1);
}
}
Expand Down
0