-
-
Couldn't load subscription status.
- Fork 1.9k
More auto-margin fixes (some of them temporary) #4216
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
Conversation
... 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.
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 ! |
|
Great thanks! Exactly what we are looking for. Any changes to get this released soon? |
Next Monday. Sorry for the wait. |
…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
…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
…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)
This PR closes #4028 - which presents two ways of getting infinite redraw loops with
axis.automarginturned 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.doAutoMargincan 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!!