-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Adding automargin support to plot titles #6428
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
Merged
Merged
Changes from 51 commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
68c6165
Initial pass with hard-coded automargin params
hannahker ad6eb00
Remove role from schema
hannahker 0826ddd
Merge branch 'master' into automargin-title
hannahker 45d9cbf
Move automargin call
hannahker c6e31be
lint
archmoj f46014f
rename mock and generate baseline
archmoj 587dfcb
update pie_automargin-margin0 baseline
archmoj 3dae109
adjust pie test
archmoj 61487a8
Simplify automargin title to use existing functions
hannahker 8679e7d
Account for padding around title
hannahker e8e49a5
Adjust mock to yref=paper
hannahker 2b59e2c
Temp fix for yref=paper
hannahker 5e4ab42
Merge branch 'master' into automargin-title
hannahker 4bb109e
Improve handling for paper ref and setting defaults
hannahker 7ce1234
Fix formatting
hannahker b274642
Add jasmine test
hannahker cc15ff6
Simplify mock
hannahker 938d52d
Fix test formatting
hannahker 75636e2
Add simple implementation for container behaviour
hannahker b7e3295
Apply review comments
hannahker 04f8825
Add more tests for yref=container
hannahker ad202d9
Ajust default setting
hannahker 9611672
Remove outdated mock
hannahker c4d1076
Update mock baselines
hannahker 21a9e59
Fix syntax
hannahker 78cecff
Remove f from test
hannahker fd111d5
Set yanchor properly when title is at bottom
hannahker 2a47c00
Make defaults setting logic more readable
hannahker 52b37c0
Add reservedMargins logic
hannahker 4322c7b
Revert some changes to test
hannahker 73ccaf4
Fix bugs
hannahker a3462d2
Fix more bugs from redraw
hannahker 33bbbef
Apply review comments
hannahker 9af5cbd
Add jasmine test for interaction with x axis
hannahker 67cf8da
Push pie test fix
hannahker 16c0bcf
Fix scooting behaviour to account for reserved margin space
hannahker 17c3244
Check if automargin is necessary before applying
hannahker c014702
Update tests
hannahker e59b18f
Warn when title.y is being set to 1
hannahker ddaf013
Fix syntax and another mock update
hannahker de7ca48
Apply review comments
hannahker e77126c
Calc bb for title
hannahker 26ca553
Fix warning log
hannahker e5e8a2a
Update parameter description
hannahker d70fb46
Reposition properly
hannahker 616057f
Merge branch 'master' into automargin-title
hannahker 3523406
Only reposition title if necessary
hannahker 90bd374
Fix syntax
hannahker 158791f
Fix tests
hannahker c4e706e
Merge branch 'automargin-title-dev' into automargin-title
hannahker 087c162
Adjust tests to match rendering in CI
hannahker c4d75d4
Update mocks
hannahker a257836
Add review comment
hannahker 662628e
Update mock baselines
hannahker e4b5f29
Adjust titles on mocks
hannahker 3dcaab8
Update baselines
hannahker 2a0011a
Add milti-line title
hannahker a8185f4
Update baselines
hannahker 0c0e47e
Revert dy change
hannahker 7f89c73
move smart default for title.y and title.yanchor to supply defaults
archmoj 132c57b
Adjust dy to fix offset
hannahker 7d4e352
baseline update
archmoj ad7c6f0
Add draftlog
hannahker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"showlegend": false, | ||
"type": "scatter", | ||
"x": [ | ||
1, | ||
2, | ||
3 | ||
], | ||
"y": [ | ||
4, | ||
5, | ||
6 | ||
] | ||
}], | ||
"layout": { | ||
"height": 300, | ||
"width": 400, | ||
"margin": {"t":0, "b": 0, "l": 0, "r": 0}, | ||
"xaxis": {"automargin": true, "title": {"text": "x-axis title"}}, | ||
"title": { | ||
"automargin": true, | ||
"text": "Basic title", | ||
"font": {"size": 24}, | ||
"pad": {"t": 0, "b": 0}, | ||
"y": 0, | ||
hannahker marked this conversation as resolved.
Show resolved
Hide resolved
hannahker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"yref": "container" | ||
} | ||
} | ||
} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"showlegend": false, | ||
"type": "scatter", | ||
"x": [ | ||
1, | ||
2, | ||
3 | ||
], | ||
"y": [ | ||
4, | ||
5, | ||
6 | ||
] | ||
}], | ||
"layout": { | ||
"height": 300, | ||
"width": 400, | ||
"margin": {"t":0, "b": 0, "l": 0, "r": 0}, | ||
"title": { | ||
"automargin": true, | ||
"text": "Basic title", | ||
"font": {"size": 24}, | ||
"pad": {"t": 15, "b": 10}, | ||
"yref": "paper" | ||
hannahker marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} | ||
} |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.