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

unhandled exception when using plotly-cartesian.js with scatterternary #4164

Closed
greg9504 opened this issue Sep 3, 2019 · 2 comments · Fixed by #4184
Closed

unhandled exception when using plotly-cartesian.js with scatterternary #4164

greg9504 opened this issue Sep 3, 2019 · 2 comments · Fixed by #4184
Assignees
Labels
bug something broken

Comments

@greg9504
Copy link
Contributor

greg9504 commented Sep 3, 2019

Hello,

When the "Toggle show closest data on hover" button is clicked there is an exception triggered in function getNextHover3d, approximately line 395. sceneIds is undefined.

If I switch to the full dist, the exception does not occur.
I noticed this in our app using Plotly version 1.48.3 of npm installed plotly.js-cartesian-dist, however it seems to be there with 1.49.4 as well.

Attached in the zip file is a simple html file with ternary plot that demonstrates the problem. Open dev tools and you'll see the exception.

Three.zip

if you change the dist to point to https://cdnjs.cloudflare.com/ajax/libs/plotly.js/1.49.4/plotly.js the error does not occur.

@etpinard
Copy link
Contributor

etpinard commented Sep 4, 2019

Thanks for the report!

Looks like this line:

var sceneIds = fullLayout._subplots.gl3d;

should have

sceneIds = fullLayout._subplots.gl3d || [];

Moreover, I wonder what scatterternary is doing in the cartesian bundle, maybe we take it out of there in v2.

@etpinard etpinard added the bug something broken label Sep 4, 2019
@etpinard
Copy link
Contributor

In a codepen: https://codepen.io/etpinard/pen/XWrEwrm

@etpinard etpinard self-assigned this Sep 10, 2019
etpinard added a commit that referenced this issue Sep 10, 2019
... in modebar buttons handlers called on graphs with different
    subplot arrangement that may or may not be part of one's
    partial or custom bundle.
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
2 participants