Repository navigation
Leftover traces in animations #3931
Description
Activity
We don't animate trace enter/exit at the moment cc #932
So transitions with
redraw: falsewon't work as expected. Commenting theredraw: falselines in your codepen make things work ok https://codepen.io/etpinard/pen/RmOXPb?editors=0010More in #1688
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...
Setting redraw to true does fix this, but is very janky, as the animation appears to 'stall' at every frame
:(removing the
isFullReplotcondition around:plotly.js/src/traces/scatter/plot.js
Lines 80 to 82 in d75e956
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
isFullReplotcondition, but we should probably manually test out a few things before making a PR.cc @antoinerg who may have copied that
if(isFullReplot) { join.exit().remove(); }
block in
bar/plot.jswhile working on bar transitions.Here's the
barversion of @nicolaskruchten 's codepen (https://codepen.io/nicolaskruchten/pen/KLEprV i.e. withredraw:false):https://codepen.io/etpinard/pen/MWgMEmx?editors=0010
after @antoinerg's bar transition work in #4180 and #4186.
bar/plot.jsuses slightly different wrappers thanscatter/plot.js(see #4180 (comment) for more on that topic) - notablybar/plot.jsdoes not have anyisFullReplotlogic 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 setuid) 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.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

In the following pen https://codepen.io/nicolaskruchten/pen/KLEprV?editors=0010 the trace in
datahas nouidbut inframesthere areuids... hitting 'play' results in the original trace still being visible but not hoverable. I would expect thatanimate()would clean up the original rendering there?