Skip to content

Animated Scattergl Graph Object TypeError #3243

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
swansk opened this issue Jun 11, 2021 · 3 comments
Closed

Animated Scattergl Graph Object TypeError #3243

swansk opened this issue Jun 11, 2021 · 3 comments

Comments

@swansk
Copy link

swansk commented Jun 11, 2021

This bug occurs while generating offline and online graphs in Plotly (version = "4.14.3").

When animating a Scattergl graph object, the scatter plot goes blank and a type error is reported in the console. The error follows as:

Uncaught TypeError: r[d] is undefined
    exports http://127.0.0.1:61355/:65
    d http://127.0.0.1:61355/:65
    plot http://127.0.0.1:61355/:65
    drawData http://127.0.0.1:61355/:65
    syncOrAsync http://127.0.0.1:61355/:65
    plot http://127.0.0.1:61355/:65
    call http://127.0.0.1:61355/:65
    layoutReplot http://127.0.0.1:61355/:65
    syncOrAsync http://127.0.0.1:61355/:65
    q http://127.0.0.1:61355/:65
    call http://127.0.0.1:61355/:65
    _redrawTimer http://127.0.0.1:61355/:65

Reproducible example follows below:

import numpy as np
import plotly.graph_objects as go

N = 10
fig = go.Figure(
    data=[
        go.Scattergl(
            x=np.random.randn(N),
            y=np.random.randn(N),
            mode="markers",
            marker=dict(size=4, colorbar=dict(thickness=30, ypad=80),),
        )
    ],
    layout=go.Layout(
        title="Start Title",
        updatemenus=[
            dict(
                type="buttons",
                buttons=[dict(label="Play", method="animate", args=[None])],
            )
        ],
    ),
    frames=[
        go.Frame(
            data=[
                go.Scattergl(
                    x=np.random.randn(N),
                    y=np.random.randn(N),
                    mode="markers",
                    marker=dict(size=4, colorbar=dict(thickness=30, ypad=80),),
                )
            ]
        ),
    ],
)

fig.show()

This issue only occurs with Scattergl, if you replace Scattergl with Scatter in the above example, the animation will play as intended.

@swansk
Copy link
Author

swansk commented Jun 14, 2021

Might be a similar issue to plotly/plotly.js#2791

The redraw appears to be causing the TypeError

@xuxiaoxxxx
Copy link

how do you to slove this problem?

@gvwilson
Copy link
Contributor

Hi - we are tidying up stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for a while, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. If you'd like to submit a PR, we'd be happy to prioritize a review, and if it's a request for tech support, please post in our community forum. Thank you - @gvwilson

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

3 participants