-
-
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
Automargin zoom #6312
Merged
Merged
Automargin zoom #6312
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
32a366d
Adjust skiptitle logic
hannahker 9c3be0e
Add baseline image
hannahker 0c4e55e
Fix schema and code formatting
hannahker a8645b4
Fix formatting
hannahker 10efc19
Update baseline image
hannahker 23ae4d3
Add newline to mock
hannahker 9466992
Add file for changelog
hannahker 781f0ea
Add WIP Jasmine test -- currently failing
hannahker af2a68f
Adding a commit
hannahker 2ac0b90
Fix logic in test and clean up comments
hannahker c678cb8
Update test/jasmine/tests/axes_test.js
hannahker 448d641
Update test/jasmine/tests/axes_test.js
archmoj 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix bug with automargin and axis titles [[#6312](https://github.com/plotly/plotly.js/pull/6312)] |
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,60 @@ | ||
{"data": [{ | ||
"showlegend": false, | ||
"type": "scatter", | ||
"x": [ | ||
"@100000001", | ||
"@100000002", | ||
"@100000003", | ||
"@100000004", | ||
"@100000005", | ||
"@100000006", | ||
"@100000007", | ||
"@100000008", | ||
"@100000009", | ||
"@100000010", | ||
"@100000011", | ||
"@100000012", | ||
"@100000013", | ||
"@100000014", | ||
"@100000015", | ||
"@100000016", | ||
"@100000017", | ||
"@100000018", | ||
"@100000019" | ||
], | ||
"xaxis": "x", | ||
"y": [ | ||
100, | ||
101, | ||
99, | ||
101, | ||
98, | ||
97, | ||
101, | ||
102, | ||
109, | ||
110, | ||
110, | ||
102, | ||
93, | ||
114, | ||
115, | ||
115, | ||
171, | ||
185, | ||
190 | ||
], | ||
"yaxis": "y" | ||
}], | ||
"layout": { | ||
"height": 400, | ||
"width": 700, | ||
"xaxis": { | ||
"title": {"text": "Revision"}, | ||
"automargin": true | ||
}, | ||
"yaxis": { | ||
"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.
Just to note: this specific test looks fine, but only because:
(1) all the tick labels are essentially the same length.
select(...).node()
gives you only the first element, but the first one is unlikely to conflict with the axis title. Only the labels that are directly above the title can push it down.(2) the tick labels are dense enough that even when you zoom in the title never fits between them. If that's not the case, when the title lines up right it can actually squeeze up between those labels.