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

No bar transition when uniformtext is used #4789

Open
emmanuelle opened this issue Apr 25, 2020 · 1 comment
Open

No bar transition when uniformtext is used #4789

emmanuelle opened this issue Apr 25, 2020 · 1 comment

Comments

@emmanuelle
Copy link
Contributor

@emmanuelle emmanuelle commented Apr 25, 2020

See https://codepen.io/emmanuelle-plotly/pen/ExVWBdV : there is no transition, but if you remove the uniformtext parameters the transition works again. The corresponding Python code is

df = dict(val=[1, 4, 4, 3], x=['a', 'b', 'a', 'b'], frame=[1, 1, 2, 2])
fig = px.bar(df, x='x', y='val', animation_frame='frame', text='val')
# Comment the line below for transition to work again
fig.update_layout(uniformtext_minsize=20, uniformtext_mode='hide')
fig.update_traces(texttemplate='%{text}', textposition='inside')

fig.show()

This problem was first noticed on the forum https://community.plotly.com/t/bar-chart-animation-transition-breaks-when-uniformtext-in-layout/38394

@archmoj
Copy link
Collaborator

@archmoj archmoj commented Apr 25, 2020

There is no easy fix for this until we could revise transition code.
So at the moment, this is the expected behaviour for bar-like traces as well as treemap & sunburst.
BTW I will tag this as a bug & documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.