Skip to content

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

Description

@greg9504

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.

Activity

  1. etpinard commented on Sep 4, 2019

    @etpinard
    Contributor

    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.

  2. etpinard commented on Sep 10, 2019

    @etpinard
    Contributor
  3. self-assigned this
    on Sep 10, 2019
  4. added a commit that references this issue on Sep 10, 2019
    40ee980
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions