-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Double-click to reset uses previous x range, not new one #2957
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
Comments
i thought that was a "feature" lol. I thought it was nice to revert back to the original range. |
This looks like a duplicate of #2718 |
It's certainly at least related, though I'm not clear if it's a duplicate. In #2718, the repro has different behaviors when you click the "reset axes" button versus double-clicking the X axis versus double-clicking the main plot area. I purposely didn't put any data in my example to keep the repo minimal, but perhaps it would be the same if I did? That said, I'm using plotly through react-plotly, so I don't have the option to switch from |
Thanks for the detailed report @seansfkelley From a plotly.js dev's perspective this ticket and #2718 are two manifestations of the same "less-than-ideal" behavior in plotly.js and bugging behavior in react-plotly.js. Merging with #2718 |
When using
Plotly.react
to update a chart and change the X range, something seems to retain a reference to the old X range, because double-clicking to reset the range respects the old range, not the new.Repro
https://codepen.io/anon/pen/oPYRav?editors=0010#0
Actual
Chart zooms to [ 0, 2 ].
Expected
Chart zooms to [ -1, 3 ].
Other
For some reason, this only happens if
data
is present innewPlot
. If you comment that line out, resetting doesn't work at all (unrelated bug?).The text was updated successfully, but these errors were encountered: