-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add support for ticklabelposition
"inside"/"outside" for category axes with tickson
set to "boundaries"
#7420
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
archmoj
merged 9 commits into
plotly:master
from
my-tien:ticklabelposition-category-axes
Jun 9, 2025
Merged
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
66328b4
Add support for `ticklabelposition` "inside"/"outside" for category a…
my-tien c84ae91
Add draftlog for 7420
my-tien 5caa41b
Merge remote-tracking branch 'origin-plotly/master' into ticklabelpos…
my-tien 1ed81b2
Update test/plot-schema.json with new description of ticklabelposition
my-tien 301e1ee
Add baseline image for zz-tickson_boundaries_ticklabelposition
my-tien b394eae
Update src/plots/cartesian/axes.js
archmoj 93c229b
Update src/plots/cartesian/axes.js
archmoj 11a5557
Update src/plots/cartesian/axes.js
archmoj 8ff47c2
Update draftlogs/7420_add.md
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 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 support for ticklabelposition "inside"/"outside" for category axes with `tickson` set to "boundaries" [[#7420](https://github.com/plotly/plotly.js/pull/7420)] | ||
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
150 changes: 150 additions & 0 deletions
150
test/image/mocks/zz-tickson_boundaries_ticklabelposition.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,150 @@ | ||
{ | ||
"data": [ | ||
{ | ||
"type": "box", | ||
"x": [ | ||
"day 1", | ||
"day 1", | ||
"day 1", | ||
"day 1", | ||
"day 1", | ||
"day 1", | ||
"day 2", | ||
"day 2", | ||
"day 2", | ||
"day 2", | ||
"day 2", | ||
"day 2" | ||
], | ||
"y": [0.2, 0.2, 0.6, 1, 0.5, 0.4, 0.2, 0.7, 0.9, 0.1, 0.5, 0.3] | ||
}, | ||
{ | ||
"type": "box", | ||
"x": [ | ||
"day 1", | ||
"day 1", | ||
"day 1", | ||
"day 1", | ||
"day 1", | ||
"day 1", | ||
"day 2", | ||
"day 2", | ||
"day 2", | ||
"day 2", | ||
"day 2", | ||
"day 2" | ||
], | ||
"y": [0.1, 0.3, 0.1, 0.9, 0.6, 0.6, 0.9, 1, 0.3, 0.6, 0.8, 0.5] | ||
}, | ||
{ | ||
"type": "box", | ||
"x": [ | ||
"day 1", | ||
"day 1", | ||
"day 1", | ||
"day 1", | ||
"day 1", | ||
"day 1", | ||
"day 2", | ||
"day 2", | ||
"day 2", | ||
"day 2", | ||
"day 2", | ||
"day 2" | ||
], | ||
"y": [0.6, 0.7, 0.3, 0.6, 0, 0.5, 0.7, 0.9, 0.5, 0.8, 0.7, 0.2] | ||
}, | ||
|
||
{ | ||
"type": "bar", | ||
"x": [1, 2, 1], | ||
"y": ["apples", "bananas", "clementines"], | ||
"orientation": "h", | ||
"xaxis": "x2", | ||
"yaxis": "y2" | ||
}, | ||
{ | ||
"type": "bar", | ||
"x": [1.3, 2.2, 0.8], | ||
"y": ["apples", "bananas", "clementines"], | ||
"orientation": "h", | ||
"xaxis": "x2", | ||
"yaxis": "y2" | ||
}, | ||
{ | ||
"type": "bar", | ||
"x": [3, 3.2, 1.8], | ||
"y": ["apples", "bananas", "clementines"], | ||
"orientation": "h", | ||
"xaxis": "x2", | ||
"yaxis": "y2" | ||
}, | ||
|
||
{ | ||
"type": "bar", | ||
"name": "with dtick !== 1", | ||
"x": ["a", "b", "c", "d", "e", "f", "g", "h"], | ||
"y": [1, 2, 1, 2, 1, 3, 4, 1], | ||
"xaxis": "x3", | ||
"yaxis": "y3" | ||
}, | ||
|
||
{ | ||
"mode": "markers", | ||
"marker": { "symbol": "square" }, | ||
"name": "with overlapping tick labels", | ||
"x": ["A very long title", "short", "Another very long title"], | ||
"y": [0, 10, 2], | ||
"xaxis": "x4", | ||
"yaxis": "y4" | ||
} | ||
], | ||
"layout": { | ||
"title": { | ||
"text": "Although some ticklabelpositions have a side specified,<br>all category labels are expected to be centered." | ||
}, | ||
"boxmode": "group", | ||
"grid": { | ||
"rows": 4, | ||
"columns": 1, | ||
"pattern": "independent", | ||
"ygap": 0.2 | ||
}, | ||
"xaxis": { | ||
"ticklabelposition": "inside right", | ||
"ticks": "outside", | ||
"tickson": "boundaries", | ||
"gridcolor": "white", | ||
"gridwidth": 4 | ||
}, | ||
"yaxis2": { | ||
"ticks": "inside", | ||
"ticklabelposition": "inside top", | ||
"tickson": "boundaries", | ||
"gridcolor": "white", | ||
"gridwidth": 4 | ||
}, | ||
"xaxis3": { | ||
"ticks": "inside", | ||
"ticklabelposition": "inside left", | ||
"tickson": "boundaries", | ||
"gridcolor": "white", | ||
"gridwidth": 4, | ||
"dtick": 2 | ||
}, | ||
"xaxis4": { | ||
"domain": [0.22, 0.78], | ||
"ticks": "outside", | ||
"ticklabelposition": "inside", | ||
"ticklen": 20, | ||
"tickson": "boundaries", | ||
"gridcolor": "white", | ||
"gridwidth": 4 | ||
}, | ||
"plot_bgcolor": "lightgrey", | ||
"showlegend": false, | ||
"width": 500, | ||
"height": 800, | ||
"margin": { "b": 140 } | ||
} | ||
} |
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.