-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
[BUG]Resetting Axes Doesn't Reset Trace If X-Axis Range Is Set #335
Labels
bug
Something isn't working
Comments
Hi @yzhaoinuw, I was occupied with some other code development! I will have a look at it somewhere later this week! |
jonasvdd
pushed a commit
to jonasvdd/plotly-resampler
that referenced
this issue
Mar 6, 2025
jonasvdd
added a commit
that referenced
this issue
Mar 6, 2025
* Fix: Add xaxis.range[0]/[1] If Not Exist #335 * 🔍 adding test + some more docs --------- Co-authored-by: yzhaoinuw <[email protected]>
Fixed in #342, will be included in a new release! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Description 🖍️
In a
FigureResampler
, if the x range of a subplot is set and if the number of points in the subplot exceedsdefault_n_shown_samples
, then clicking Reset Axes after zooming in on the subplot does not reset the trace. It still shows the trace in the zoomed-in view while the x range of the subplot is reset. The user needs to pan or zoom in or out on the subplot again to reset the trace.Reproducing The Bug 🔍
Minimal code to reproduce the bug.
Expected Behavior 🔧
When clicking Reset Axes after zooming in, the trace should be reset along with the x-axis.
Screenshots 📸
plotly_bug_demo.mp4
Environment Information
Possible Cause
I noticed that in the situation described above, after clicking Reset Axes,
relayoutdata
only hasxaxis.range
, but notxaxis.range[0]
andxaxis.range[1]
. This seemed to be the cause of the bug because in the function_construct_update_data
, it explicitly matches the start and the end in thr format ofxaxis\d*.range\[0]
andxaxis\d*.range\[1]
, respectively, in order to update the trace.The text was updated successfully, but these errors were encountered: