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

xaxis.range and yaxis.range in Relayout data get removed on performing other interactions (than zoom) #1004

Closed
Kishanrajput opened this issue Nov 6, 2019 · 2 comments

Comments

@Kishanrajput
Copy link

dash 1.4.0
dash-core-components 1.3.0
dash-html-components 0.16.0

bug
When I zoom in/out on graph, attributes xaxis.range and yaxis.range are created/updated in the RelayoutData dictionary which is expected. But upon performing other interactions (like lasso select, clicking on 'show closest data on hover') it adds respective attributes in RelayoutData but removes existing xaxis.range and yaxis.range.

Expected behavior
I think it is more helpful to keep the axis range data unchanged when other interactions are performed. I need the axis range data if my plot is updated after performing other interactions; in order to keep the same zoom level.

This issue can be seen at the dash official User Guide for interactive grapphing - https://dash.plot.ly/interactive-graphing

@alexcjohnson
Copy link
Collaborator

Accumulating changes in these props is an interesting idea, but for other purposes it's important to know what changed in this particular event. So I don't think we can consider this a bug. The solution we have in mind for this is to create a new partial "live" figure prop plotly/dash-core-components#584

@Kishanrajput
Copy link
Author

This makes sense, Thanks!
For now I thing the best solution is to store the zoom level in Store and use them while updating graph with some conditional statements. But for long term, I think the idea of "liveFigure" makes more sense.

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