scattergl hover error with nulls
See original GitHub issueIt 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 access cd[0]
? I have also seen errors further down where it makes it past this line:
var stash = cd[0].t;
but fails here:
var x = stash.x;
I will note that this is only an issue with scattergl
and not the normal SVG scatter
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
Oh, I’m sorry, disregard https://github.com/plotly/plotly.js/issues/4212#issuecomment-534219458
Interesting. It’s failing in 1.45.0 though: https://codepen.io/etpinard/pen/NWKoRMJ?editors=1010