Skip to content

Leftover traces in animations #3931

Description

@nicolaskruchten

In the following pen https://codepen.io/nicolaskruchten/pen/KLEprV?editors=0010 the trace in data has no uid but in frames there are uids ... hitting 'play' results in the original trace still being visible but not hoverable. I would expect that animate() would clean up the original rendering there?

Activity

  1. etpinard commented on Jun 5, 2019

    @etpinard
    Contributor

    We don't animate trace enter/exit at the moment cc #932

    So transitions with redraw: false won't work as expected. Commenting the redraw: false lines in your codepen make things work ok https://codepen.io/etpinard/pen/RmOXPb?editors=0010

    More in #1688

  2. nicolaskruchten commented on Jun 6, 2019

    @nicolaskruchten
    ContributorAuthor

    so when you say "animate trace exit" you mean "we leave them there on purpose even if they're no longer present in the active frame"? That's what I'm seeing right now, and the markers that are left aren't hoverable...

  3. nicolaskruchten commented on Jun 6, 2019

    @nicolaskruchten
    ContributorAuthor

    Setting redraw to true does fix this, but is very janky, as the animation appears to 'stall' at every frame
    :(

  4. etpinard commented on Jul 3, 2019

    @etpinard
    Contributor

    removing the isFullReplot condition around:

    if(isFullReplot) {
    join.exit().remove();
    }

    seems to solve the problem and doesn't make any test fail.

    I can't remember what Ricky envisioned with that isFullReplot condition, but we should probably manually test out a few things before making a PR.

  5. etpinard commented on Sep 6, 2019

    @etpinard
    Contributor

    cc @antoinerg who may have copied that

     if(isFullReplot) { 
         join.exit().remove(); 
     } 

    block in bar/plot.js while working on bar transitions.

  6. etpinard commented on Sep 30, 2019

    @etpinard
    Contributor

    Here's the bar version of @nicolaskruchten 's codepen (https://codepen.io/nicolaskruchten/pen/KLEprV i.e. with redraw:false):

    https://codepen.io/etpinard/pen/MWgMEmx?editors=0010

    Peek 2019-09-30 18-01

    after @antoinerg's bar transition work in #4180 and #4186.


    bar/plot.js uses slightly different wrappers than scatter/plot.js (see #4180 (comment) for more on that topic) - notably bar/plot.js does not have any isFullReplot logic which seems to be the cause of this issue here (see #3931 (comment)).

    So, the bar version above does clear the "leftover" trace correctly, but looks like it tries to transition from the base trace (w/o a uid) to the first frame (with a set uid) using a black (misdefined?) bar before transitioning to the position of the second frame. So, the bar version is better, but still not working correctly.

  7. gvwilson commented on Jun 14, 2024

    @gvwilson
    Contributor

    Hi - we are currently trying to tidy up Plotly's public repositories to help us focus our efforts on things that will help users most. Since this issue has been sitting for several years, I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our backlog. Thanks for your help - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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