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

Plotly basic module much slower than full Plotly for scattergl. #4458

Closed
tboerstad opened this issue Jan 2, 2020 · 4 comments
Closed

Plotly basic module much slower than full Plotly for scattergl. #4458

tboerstad opened this issue Jan 2, 2020 · 4 comments

Comments

@tboerstad
Copy link

The only difference between these two pens is which module of Plotly is included:

plotly-latest.min.js is working fine:
https://codepen.io/tboerstad/pen/dyPZoRq

plotly-basic-latest.min.js is slow, especially hovering the mouse over the data points
https://codepen.io/tboerstad/pen/RwNjPgv

@alexcjohnson
Copy link
Collaborator

The basic module doesn't include scattergl, so that codepen will fall back to regular scatter.
https://github.com/plotly/plotly.js/tree/master/dist#plotlyjs-basic

@tboerstad
Copy link
Author

Thank you @alexcjohnson.

As a new user of Plotly.js, it would be helpful to get a warning or error if you try to use a module which is not available. Especially because everything appears to work as normal.

@alexcjohnson
Copy link
Collaborator

Yeah, I know that can be confusing - it's a decision we made early on to silently ignore unrecognized attributes and attribute values of all kinds, mainly because when you're editing a graph interactively it's easy to end up with leftovers from a previous state (like if you had edited line style but then decide to only display points) and it can even be convenient to get those settings back later if you change your mind.

You can use Plotly.validate to ensure all the settings you passed in are used. We've talked about making a debug mode to validate automatically #1741 but this has never quite bubbled up to the top of the queue.

@tboerstad
Copy link
Author

Thank you, that makes sense. I'll start using Plotly.validate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants