Skip to content

TypeError: Cannot create property '_snapshotInProgress' on string 'plot' #2930

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
PeterJPRoche opened this issue Aug 20, 2018 · 0 comments · Fixed by #2931
Closed

TypeError: Cannot create property '_snapshotInProgress' on string 'plot' #2930

PeterJPRoche opened this issue Aug 20, 2018 · 0 comments · Fixed by #2931
Labels
bug something broken

Comments

@PeterJPRoche
Copy link

This is my first post on here, so apologies if I have missed something ...

I'm getting a type error when using Plotly.downloadImage(). According to the docs here:

The first argument to each function on this page is a reference to this element, and it can be either a DOM node, i.e. the output of document.getElementById(), or a string, in which case it will be treated as the id of the div.

But looking at /src/snapshot/download.js, it looks like passing the string (the id of the div) shouldn't work as the method doesn't look like it tries to find the DOM element from the passed string.... I've created a simplified CodePen that replicates the issue: https://codepen.io/DrRochy/pen/LJYbja

So, it seems to work correctly if you pass the object, but not when you just pass the string.

What's really weird is I am sure I have passed the id of the div element and this has worked, so I am very baffled how!

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