-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
scattergl hover error with nulls #4212
Comments
Thanks very much for reporting! |
Looks like this is regression from 1.45.0. Things were working ok in 1.44.4: https://codepen.io/etpinard/pen/VwZgjom?editors=1010 |
|
Interesting. It's failing in 1.45.0 though: https://codepen.io/etpinard/pen/NWKoRMJ?editors=1010 |
Oh, I'm sorry, disregard #4212 (comment) |
... so that we don't mutate pointData.cd and propagate 'fake' `gd.calcdata[i][j]` to subsequent _module.hoverPoints calls.
It appears that null values are not handled well by scattergl. The data that is present is displayed as expected, for example 3 of 4 points are shown in the screenshot below. However mousing around the plot area throws a lot of errors from the
hoverPoints
function. For example,Uncaught TypeError: Cannot read property 't' of undefined
.Reproducible example:
https://jsfiddle.net/bhogan_mitre/u41pn9eo/
I believe this is the underlying function at fault: https://github.com/plotly/plotly.js/blob/master/src/traces/scattergl/hover.js#L15
Would it be appropriate to add some checks in that function on
cd
before trying to accesscd[0]
? I have also seen errors further down where it makes it past this line:but fails here:
I will note that this is only an issue with
scattergl
and not the normal SVGscatter
.The text was updated successfully, but these errors were encountered: