-
-
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
automatic margins for long labels #2243
Merged
Merged
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
6797c9d
first cut at automatic margins for long labels
nicolaskruchten f83fb55
:hocho: test code
nicolaskruchten eda678d
proper fix for top/right axes
nicolaskruchten e86cfea
subplot-compatible generalization
nicolaskruchten 8a5de93
Merge branch 'master' into label_automargin
nicolaskruchten 0ef6009
creating default-false parameter
nicolaskruchten 412941c
option guard
nicolaskruchten bc0cf06
removing package-lock.json
nicolaskruchten b2d49d5
Merge branch 'master' into label_automargin
nicolaskruchten 25a36db
adding baseline, fixing coerce check
nicolaskruchten d89f23e
moving coercion around
nicolaskruchten 8d0a5eb
Merge branch 'master' into label_automargin
nicolaskruchten 67b04e9
ticklabelsautomargin -> automargin
nicolaskruchten 05b909a
Merge branch 'master' into label_automargin
nicolaskruchten a05bd81
first relayout test
nicolaskruchten eeb1f65
make relayout test relative, add guards
nicolaskruchten c1f7df4
more guards
nicolaskruchten 48da987
Merge branch 'master' into label_automargin
nicolaskruchten 504d133
axes push according to the domain of their anchor
nicolaskruchten ae6ec95
formatting of mock
nicolaskruchten 20bdefa
exclude polar and ternary from automargins
nicolaskruchten 1df34bd
add editType to clear automargins from pushmargins
nicolaskruchten 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 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 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 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 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 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 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.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"type": "scatter", | ||
"name": "loooooong x", | ||
"x": [ | ||
"short label 1", | ||
"loooooong label 1", | ||
"short label 2", | ||
"loooooong label 2", | ||
"short label 3", | ||
"loooooong label 3", | ||
"short label 4", | ||
"loooooongloooooongloooooong label 4", | ||
"short label 5", | ||
"loooooong label 5" | ||
], | ||
"y": [ | ||
"short label 1", | ||
"loooooong label 1", | ||
"short label 2", | ||
"loooooong label 2", | ||
"short label 3", | ||
"loooooong label 3", | ||
"short label 4", | ||
"loooooong label 4", | ||
"short label 5", | ||
"loooooong label 5" | ||
] | ||
}, | ||
{ | ||
"yaxis": "y2", | ||
"type": "scatter", | ||
"name": "loooooong y", | ||
"x": ["looooooooooooonger"], | ||
"y": ["loooooooo"] | ||
} | ||
], | ||
"layout": { | ||
"xaxis": { | ||
"title": "X Axis Title", | ||
"titlefont": { "size": 80 }, | ||
"automargin": true | ||
}, | ||
"yaxis": { | ||
"title": "Y Axis Title", | ||
"titlefont": { "size": 40 }, | ||
"ticklen": 50, | ||
"automargin": true | ||
}, | ||
"yaxis2": { | ||
"title": "Y2 Axis Title", | ||
"overlaying": "y", | ||
"side": "right", | ||
"titlefont": { "size": 40 }, | ||
"automargin": true | ||
} | ||
} | ||
} |
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
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.
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.
might be nice to let polar and ternary contribute to automargin in the future - but since this is an axis-level attribute I guess there's no problem ignoring that part for now.