-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add ticklabelstandoff
and ticklabelshift
to cartesian axes
#7006
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 all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
6c81892
Add property axis.ticklabelshiftx and axis.ticklabelshifty
my-tien ad4509b
makeTransTickLabelFn: default vals for ax.ticklabelshiftx/y
my-tien fa50121
Add draftlog for PR 7006
my-tien d33e47c
Add ticklabelshiftx/y property to colorbar, indicator, gl3d, carpet, …
my-tien 3dcb2aa
baseline image for updated date_axes_period2 using ticklabelshiftx/y
my-tien facdad3
ticklabelshiftx/y: valType number → integer. for carpet: editType tic…
my-tien ecf4787
Revert ticklabelshiftx/y change to mock date_axes_period2
my-tien 2b9c90c
Replace ticklabelshiftx/y with ticklabelrunoff and ticklabelstandoff
my-tien f06a81e
Adjust ticklabelrunoff/ticklabelstandoff behavior depending on axis, …
my-tien 57c82ee
baseline test mock for ticklabelrunoff/ticklabelstandoff
my-tien 4ccaf73
Merge remote-tracking branch 'origin-plotly/master' into shift_axis_l…
my-tien 4b62652
baseline image for mock zzz_ticklabelrunoff_standoff
my-tien 94878cb
Split option noTicklabelrunoffstandoff → noTicklabelrunoff, noTicklab…
my-tien 9ca95a2
Update property names in draftlog for PR 7006
my-tien 6ea832f
Mark flaky: "should be able to restyle radial axis title"
my-tien b7a6327
Revert "Mark flaky: "should be able to restyle radial axis title""
my-tien 316158d
Merge remote-tracking branch 'origin-plotly/master' into shift_axis_l…
my-tien e7a980a
Revert accidentally removed line in colorbar attributes
my-tien e8f88ba
correct var name. it's not ticks inside/outside, but labels inside/ou…
my-tien d9210da
Clarify the direction of movement for ticklabelstandoff and ticklabel…
my-tien e33270b
update plot-schema as well
my-tien ec5df56
Rename ticklabelrunoff → ticklabelshift
my-tien e3b0baa
Update draftlogs/7006_add.md
my-tien 23a21c1
Simplify code for standoff sign
my-tien 6715564
Update draftlogs/7006_add.md
my-tien 26315dc
improve ticklabelstandoff description and note that inside ticks coul…
my-tien 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Add property `ticklabelstandoff` and `ticklabelshift` to cartesian axes to adjust positioning of tick labels [[#7006](https://github.com/plotly/plotly.js/pull/7006)] |
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
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.
158 changes: 158 additions & 0 deletions
158
test/image/mocks/zzz_ticklabelshift_ticklabelstandoff.json
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,158 @@ | ||
{ | ||
"data": [{ | ||
"xaxis": "x", | ||
"yaxis": "y", | ||
"x": ["20-12-20", "21-01-20"], | ||
"y": [1e-1, 1e+6] | ||
}, { | ||
"xaxis": "x2", | ||
"yaxis": "y2", | ||
"x": ["20-10", "21-05-15"], | ||
"y": [1e-1, 1e+6] | ||
}, { | ||
"xaxis": "x3", | ||
"yaxis": "y3", | ||
"x": ["20", "23"], | ||
"y": [1e-1, 1e+6] | ||
}, { | ||
"xaxis": "x4", | ||
"yaxis": "y4", | ||
"x": ["20-12-20", "21-01-20"], | ||
"y": [1e-1, 1e+6] | ||
}], | ||
"layout": { | ||
"xaxis": { | ||
"minor": { "showgrid": true }, | ||
"anchor": "y", | ||
"domain": [0, 0.475], | ||
"type": "date", | ||
"ticklabelmode": "period", | ||
"ticklabelstandoff": 20, | ||
"ticklabelshift": 20, | ||
"side": "bottom", | ||
"ticks": "inside", | ||
"tickfont": { "size": 16 }, | ||
"ticklen": 16, | ||
"tickwidth": 8, | ||
"linewidth": 1, | ||
"gridcolor": "white" | ||
}, | ||
"yaxis": { | ||
"minor": { "showgrid": true }, | ||
"anchor": "x", | ||
"domain": [0, 0.475], | ||
"autorange": "reversed", | ||
"type": "log", | ||
"side": "left", | ||
"ticks": "inside", | ||
"ticklabelposition": "outside top", | ||
"ticklabelstandoff": 20, | ||
"tickfont": { "size": 20 }, | ||
"ticklen": 8, | ||
"tickwidth": 4, | ||
"linewidth": 4, | ||
"gridcolor": "white" | ||
}, | ||
"xaxis2": { | ||
"minor": { "showgrid": true }, | ||
"anchor": "y2", | ||
"domain": [0.525, 1], | ||
"autorange": "reversed", | ||
"type": "date", | ||
"side": "bottom", | ||
"ticks": "inside", | ||
"ticklabelposition": "inside left", | ||
"ticklabelstandoff": 20, | ||
"tickfont": { "size": 20 }, | ||
"ticklen": 8, | ||
"tickwidth": 4, | ||
"linewidth": 4, | ||
"gridcolor": "white" | ||
}, | ||
"yaxis2": { | ||
"minor": { "showgrid": true }, | ||
"anchor": "x2", | ||
"domain": [0, 0.475], | ||
"type": "log", | ||
"side": "right", | ||
"ticks": "inside", | ||
"ticklabelposition": "inside", | ||
"ticklabelstandoff": 20, | ||
"ticklen": 16, | ||
"tickwidth": 8, | ||
"linewidth": 1, | ||
"gridcolor": "white" | ||
}, | ||
"xaxis3": { | ||
"minor": { "showgrid": true }, | ||
"anchor": "y3", | ||
"domain": [0.525, 1], | ||
"type": "date", | ||
"side": "top", | ||
"ticks": "inside", | ||
"ticklabelposition": "inside right", | ||
"ticklabelstandoff": 20, | ||
"ticklabelshift": 40, | ||
"tickfont": { "size": 20 }, | ||
"ticklen": 16, | ||
"tickwidth": 8, | ||
"linewidth": 1, | ||
"gridcolor": "white" | ||
}, | ||
"yaxis3": { | ||
"minor": { "showgrid": true }, | ||
"anchor": "x3", | ||
"domain": [0.525, 1], | ||
"autorange": "reversed", | ||
"type": "log", | ||
"side": "right", | ||
"ticks": "inside", | ||
"ticklabelposition": "inside bottom", | ||
"ticklabelstandoff": 10, | ||
"ticklabelshift": -10, | ||
"tickfont": { "size": 16 }, | ||
"ticklen": 8, | ||
"tickwidth": 4, | ||
"linewidth": 4, | ||
"gridcolor": "white" | ||
}, | ||
"xaxis4": { | ||
"minor": { "showgrid": true }, | ||
"anchor": "y4", | ||
"domain": [0, 0.475], | ||
"autorange": "reversed", | ||
"type": "date", | ||
"ticklabelmode": "period", | ||
"side": "top", | ||
"ticks": "outside", | ||
"ticklabelposition": "outside", | ||
"ticklabelstandoff": -10, | ||
"ticklabelshift": 15, | ||
"tickfont": { "size": 16 }, | ||
"ticklen": 8, | ||
"tickwidth": 4, | ||
"linewidth": 4, | ||
"gridcolor": "white" | ||
}, | ||
"yaxis4": { | ||
"minor": { "showgrid": true }, | ||
"anchor": "x4", | ||
"domain": [0.525, 1], | ||
"type": "log", | ||
"side": "left", | ||
"ticks": "outside", | ||
"ticklabelposition": "outside bottom", | ||
"tickangle": 30, | ||
"tickfont": { "size": 16 }, | ||
"ticklen": 16, | ||
"tickwidth": 8, | ||
"linewidth": 1, | ||
"gridcolor": "white" | ||
}, | ||
"font": { | ||
"family": "Raleway" | ||
}, | ||
"plot_bgcolor": "lightblue", | ||
"showlegend": false | ||
} | ||
} |
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
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.