-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
More auto-margin fixes (some of them temporary) #4216
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... this enables an axis to push the margin on both side of its span
N.B. during auto-margin redraw, if the axis fixed its label overlaps by rotating 90 degrees, do not attempt to re-fix its label overlaps as this can lead to infinite redraw loops! Moreover, use ax._prevTickAngles for retrieve "lastAngle". Previous ax._tickAngles was used, but this one gets clear early Axes.drawOne, so it didn't really do anything.
... that Plots.doAutoMargin can trigger.
archmoj
reviewed
Sep 25, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic PR.
💃
@etpinard |
Thanks very much for the review @archmoj ! |
Closed
Great thanks! Exactly what we are looking for. Any changes to get this released soon? |
Next Monday. Sorry for the wait. |
petii
added a commit
to tulip/plotly.js
that referenced
this pull request
Apr 27, 2022
…ary) plotly#4216" Commits: - do not try to re-fix axis label overlaps when current autoangle:=90 7a8eedf - Add (large) upper bound on the number of redraw calls 631014a
petii
added a commit
to tulip/plotly.js
that referenced
this pull request
Apr 28, 2022
…ary) plotly#4216" Commits: - do not try to re-fix axis label overlaps when current autoangle:=90 7a8eedf - Add (large) upper bound on the number of redraw calls 631014a
petii
added a commit
to tulip/plotly.js
that referenced
this pull request
Apr 28, 2022
…ary) plotly#4216" Commits: - do not try to re-fix axis label overlaps when current autoangle:=90 1fc0223 (upstream 7a8eedf) - Add (large) upper bound on the number of redraw calls 83f1a36 (upstream 631014a)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR closes #4028 - which presents two ways of getting infinite redraw loops with
axis.automargin
turned on.Example 1:
before: https://codepen.io/alanjmac/pen/oraKpR (try reducing the window width, squashing the graph)
after: https://codepen.io/etpinard/pen/OJLqVZK
Example 2:
before: https://codepen.io/wbrgss/pen/LYPryKO (open the console in Chrome, you should see
Uncaught RangeError: Maximum call stack size exceeded
)after: https://codepen.io/etpinard/pen/xxKBGzW
Shoutout to @wbrgss for this example!
In brief,
solution listed in #2704 (comment)
Plots.doAutoMargin
can trigger. This should remove all potential infinite redraw loops from our code. I'm hoping that this solution will be temporary and that by fixing our automargin pipeline problems (see Automargin pipeline #2704 (comment) for more on that), we'll be able to revert it.@archmoj this one should go in
1.50.0
- looking for a quick review. Thanks!!