Skip to content

Error using scattergl when plot has text and non-text data #3559

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
Jeffrey72 opened this issue Feb 20, 2019 · 0 comments · Fixed by #3575
Closed

Error using scattergl when plot has text and non-text data #3559

Jeffrey72 opened this issue Feb 20, 2019 · 0 comments · Fixed by #3575
Assignees
Labels
bug something broken

Comments

@Jeffrey72
Copy link

https://codepen.io/anon/pen/JxVZeR?editors=1111

Reproduction:
In the codepen select some points using the lasso tool, and then click a zoom button.

Notable features of the codepen are that both data traces have the type 'scattergl' and only one of the two traces has a mode that contains 'text'.
(I used Chrome to reproduce)

Bug:
The traces disappear, and there is an error in the dev-tools console:
Uncaught TypeError: Cannot read property 'color' of undefined
at styleTextSelection (plotly-latest.js:173530)
at plotly-latest.js:173210
at Array.forEach ()
at Object.plot (plotly-latest.js:173208)
at plotOne (plotly-latest.js:117826)
at Object.exports.plot (plotly-latest.js:117750)
at exports.drawData (plotly-latest.js:110083)
at Object.lib.syncOrAsync (plotly-latest.js:99315)
at relayout (plotly-latest.js:106232)
at wrappedEdit (plotly-latest.js:106760)

Note:
A naive solution may just be to check if the textOptions at the current index is undefined before continuing.

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.

2 participants