Skip to content
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

Fix scattergl hover over nulls #4213

Merged
merged 2 commits into from
Sep 23, 2019
Merged

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented Sep 23, 2019

fixes #4212 - a bug introduced in 1.45.0 as a side-effect of #3578

before: https://codepen.io/etpinard/pen/LYPqWYZ (hover over x=3 and check console)
after: https://codepen.io/etpinard/pen/YzKBNbp?editors=1010

In scatter/hover.js, we used to mutate pointData.cd in order to get scattergl traces to work with the parts of Fx.hover that expect gd.calcdata[i] to have length=trace._length (which isn't the case for scattergl). Before #3578, we used to return early here

} else return [pointData];

and the wrong pointData.cd mutation did not occur.

cc @archmoj

... so that we don't mutate pointData.cd and propagate 'fake'
    `gd.calcdata[i][j]` to subsequent _module.hoverPoints calls.
- post #3578 all scattergl traces either set a `tree` or
  and `ids` array during the calc step.
@etpinard etpinard added bug something broken status: reviewable labels Sep 23, 2019
@archmoj
Copy link
Contributor

archmoj commented Sep 23, 2019

@etpinard thanks very much for the PR.
💃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scattergl hover error with nulls
2 participants