-
-
Notifications
You must be signed in to change notification settings - Fork 74
[BUG]Resetting Axes Doesn't Reset Trace If X-Axis Range Is Set #335
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
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! |
This can be tested in |
That's awesome, @jonasvdd. Thank you. I look forward to the 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: