Skip to content

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

Closed
@PeterJPRoche

Description

@PeterJPRoche

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions