-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7006 from my-tien/shift_axis_label
Add `ticklabelstandoff` and `ticklabelshift` to cartesian axes
- Loading branch information
Showing
14 changed files
with
254 additions
and
7 deletions.
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 @@ | ||
- 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 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
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.
158 changes: 158 additions & 0 deletions
158
test/image/mocks/zzz_ticklabelshift_ticklabelstandoff.json
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,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 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