Skip to content

Bar charts disappear while animating #1019

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
hellochar opened this issue Oct 7, 2016 · 10 comments
Closed

Bar charts disappear while animating #1019

hellochar opened this issue Oct 7, 2016 · 10 comments
Labels
feature something new

Comments

@hellochar
Copy link

Hey Plotly, I'm trying to animate a zoom into a bar chart (see http://codepen.io/hellochar/pen/ozEBXr), but it looks like the bar charts disappear when they're being animated? Is that something intentional or something I'm doing wrong?

Also orthogonally, it looks like many of the different layout properties aren't animated smoothly - for instance, margin, width, height, bargap, xaxis.domain - is this expected?

Thanks for your time,
Xiaohan

@rreusser
Copy link
Contributor

Thanks for the report, @hellochar! The short answer is that all of the animation effort so far has gone into 1) infrastructure for defining what animation means in plotly, and 2) animating scatter traces. I expected bar charts to fall back to instantaneous updates so I'm not thrilled that they simply disappear while updating.

The first step that's necessary to fix this is to work d3 element persistence into bar charts. There's some work going on with bar charts at the moment that I need to avoid conflicting with, but I'd really like to tackle them as soon as that's complete. Long story short, I think it will be about two weeks until I can get this implemented and cleaned up. Apologies for the phased implementation, but it's very helpful to hear about the interest!

@rreusser rreusser added bug something broken feature something new status: on hold labels Oct 11, 2016
@rreusser rreusser self-assigned this Oct 11, 2016
@geekuillaume

This comment has been minimized.

@rreusser
Copy link
Contributor

One bug to fix, then I'm on it! Follow #1143 for more specific updates on bar charts.

@etpinard
Copy link
Contributor

PR #1647 was pretty close to getting this done. 😞

@parmentelat

This comment has been minimized.

@etpinard

This comment has been minimized.

@parmentelat

This comment has been minimized.

@darabos
Copy link
Contributor

darabos commented Oct 2, 2018

I thought I'd have a stab at this. I've sent a PR against my fork as a preview: darabos#2. What do you think? I'm trying to follow the scatter animation code and the previous PRs. With a simple stacked bar chart it looks good so far.

I'm happy to look into the TODO items that were listed on #1647. I just wanted to check with you first. Thanks!

@woodwards
Copy link

You can do a workaround using fat lines that look like bars:

https://stackoverflow.com/questions/56623868/animate-plotly-plot-in-shiny-when-data-changes/56623991#56623991

@etpinard
Copy link
Contributor

etpinard commented Jul 3, 2019

Merging into #3896 - which has a few recent comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants