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

uirevision equal to 0 does not preserve ui state in dcc.Graph #116

Open
pmkroeker opened this issue Apr 20, 2021 · 2 comments
Open

uirevision equal to 0 does not preserve ui state in dcc.Graph #116

pmkroeker opened this issue Apr 20, 2021 · 2 comments

Comments

@pmkroeker
Copy link

Not sure if this belongs here or in plotly, so let me know if this should be moved.

I was trying to add uirevision to preserve legend selections on a barchart, so I set uirevision=0 and left it unchanged. The chart continued to reset the selections back to the default when the chart was updated.

However, if the value of uirevision is changed to 1, and left unchanged, then it works as expected.

According to this post, uirevision can be set to any value, and the chart should only reset the ui state when the value is changed.

@pmkroeker
Copy link
Author

pmkroeker commented Apr 20, 2021

I'm not sure if this should be marked as a bug, or more of a gotcha that people should be aware of.
EDIT:
Further down in the post there is a mention that the value should be truthy. I think there should be some documentation around this to make it more clear.

@alexcjohnson
Copy link
Collaborator

Yes, we should document better that uirevision needs to be truthy to be active. Thanks @pmkroeker !

@alexcjohnson alexcjohnson transferred this issue from plotly/dash-core-components Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants