Skip to content

Deleting a transform in lines plot creates erros #2786

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

Closed
dmt0 opened this issue Jul 6, 2018 · 3 comments · Fixed by #2805
Closed

Deleting a transform in lines plot creates erros #2786

dmt0 opened this issue Jul 6, 2018 · 3 comments · Fixed by #2805
Labels
bug something broken

Comments

@dmt0
Copy link
Contributor

dmt0 commented Jul 6, 2018

https://codepen.io/dmt0/pen/xzoBVN
newPlot @ step0; react @ step1; hover a mouse over plot, see console

Uncaught TypeError: Cannot read property 'length' of undefined
    at Object.r.makeEventData (plotly-1.39.0.min.js:7)
    at plotly-1.39.0.min.js:7
    at plotly-1.39.0.min.js:7
    at l (plotly-1.39.0.min.js:7)
    at Object.r.throttle (plotly-1.39.0.min.js:7)
    at Object.r.hover (plotly-1.39.0.min.js:7)
    at SVGRectElement.u.onmousemove (plotly-1.39.0.min.js:7)```
@etpinard
Copy link
Contributor

etpinard commented Jul 6, 2018

Ha interesting. Completing removing the transforms [] works -> https://codepen.io/etpinard/pen/rKEbzx?editors=0010. We must not handle to empty array case correctly.

@etpinard etpinard added the bug something broken label Jul 6, 2018
@dmt0
Copy link
Contributor Author

dmt0 commented Jul 6, 2018

OK cool, so I have a workaround for react-chart-editor

@bhogan-mitre
Copy link
Contributor

@dmt0 for what it's worth, I'm still seeing this from react-chart-editor v0.18.2 after deleting a transform.

core.js:1449 ERROR TypeError: Cannot read property 'length' of undefined
    at Object.makeEventData (plotly.js:83549)
    at _hover (plotly.js:84245)
    at plotly.js:83734
    at exec (plotly.js:101160)
    at Object.throttle (plotly.js:101169)
    at Object.hover (plotly.js:83731)
    at SVGRectElement.maindrag.onmousemove [as __zone_symbol__ON_PROPERTYmousemove] (plotly.js:113860)
    at SVGRectElement.wrapFn (zone.js:1188)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
    at Object.onInvokeTask (core.js:4751)

The traces appear fine from GraphCreatePanel, but the error is still thrown on hover.

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 a pull request may close this issue.

3 participants