question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plotly.animate doesn't unset attributes

See original GitHub issue

Here’s a codepen that illustrates the issue.

I expected that:

    Plotly.animate(gd, {
        traces: [0],
        data: [{
            "marker.opacity": null
        }]
    }, {
        transition: {
            easing:"cubic-in-out",
            duration: 500        
        }
    });

would unset `gd.data[0].marker.opacity.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
n-riescocommented, Mar 30, 2017

It doesn’t break anything for me at the moment. I’ve only noticed that Plotly.validate(gd.data, gd.layout) would return an error.

1reaction
etpinardcommented, Mar 30, 2017

@n-riesco @rreusser this situation is similar to https://github.com/plotly/plotly.js/issues/1410. I have no strong opinion here to be honest. I can think of situation where pruning make sense and others that don’t. Better yet, maybe as @n-riesco suggested yesterday we should expose some .getAttribute method on Plotly where it would be easier to guarantee the result as opposed to making users dig into gd.data / gd._fullData etc …

Moreover, @n-riesco’s point about Plotly.validate is fair. Maybe we should make Plotly.validate skip keys linked to nulls entirely.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plotly Animation Tutorial Draws Every Data instead of Step by ...
A Plotly animation code contains basic data and frame data. ... Since it doesn't work it's clear that something should be changed.
Read more >
animate method that can handle any type of figure diff #1849
Plotly.react diffs its input with the current state and executes the required subroutines to reach the state as described in the input. ·...
Read more >
How to make Plotly animated chart display all the categories ...
python - How to make Plotly animated chart display all the categories (not only ones present in first frame) - Stack Overflow. Stack...
Read more >
Interactive and Animated Graphics using plotly - Ryan Miller
The graphics package plotly is an open-source interactive graphing tool that ... You can click on a building type in the legend to...
Read more >
Introducing plotly.py 3.0.0 - Medium
js , so this release does not change the way that your graphs are rendered. The attributes of the graphs remain one-to-one with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found