Skip to content
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

Leftover traces in animations #3931

Closed
nicolaskruchten opened this issue Jun 3, 2019 · 7 comments
Closed

Leftover traces in animations #3931

nicolaskruchten opened this issue Jun 3, 2019 · 7 comments
Labels
bug something broken

Comments

@nicolaskruchten
Copy link
Contributor

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?

@etpinard
Copy link
Contributor

etpinard commented Jun 5, 2019

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

@nicolaskruchten
Copy link
Contributor Author

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...

@nicolaskruchten
Copy link
Contributor Author

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

@etpinard etpinard added the bug something broken label Jun 7, 2019
@etpinard
Copy link
Contributor

etpinard commented Jul 3, 2019

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.

@etpinard
Copy link
Contributor

etpinard commented Sep 6, 2019

cc @antoinerg who may have copied that

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

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

@etpinard etpinard mentioned this issue Sep 10, 2019
6 tasks
@etpinard
Copy link
Contributor

etpinard commented Sep 30, 2019

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.

@gvwilson
Copy link
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
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

3 participants