-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Calculate hidden minor ticks if ticklabelindex is set. #7735
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
Open
my-tien
wants to merge
13
commits into
plotly:master
Choose a base branch
from
my-tien:calculate-hidden-minor-ticks
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ecd3c76
Calculate hidden minor ticks if ticklabelindex is set.
my-tien 4366ed7
Add draftlog for PR 7735
my-tien 52a00cb
Fix missing trailing newline char in new mocks
my-tien 081da50
Baseline images for testing ticklabelindex when minor ticks are hidden
my-tien a3cc377
Fix accidental drawing of additional minor tick before tick0.
my-tien 92c800a
Update baseline images for date_axes_period_ticklabelindex and date_a…
my-tien e3f9006
Merge remote-tracking branch 'origin-plotly/master' into calculate-hi…
my-tien 3d9714c
Update baseline images for date_axes_period_ticklabelindex and date_a…
my-tien e85de13
Change draftlog from change to fix
my-tien 202ea7b
Merge new mocks for ticklabelindex on figures with hidden minor ticks…
my-tien 5861fc5
Revert code style for checking if the label should be hidden to how i…
my-tien 474daa5
Add minor tick dtick and tick0 for new ticklabelindex mock
my-tien 60b5d66
Revert "Revert code style for checking if the label should be hidden …
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 @@ | ||
| - Fix unexpected `ticklabelindex` behavior when minor ticks are not shown. [[#7735](https://github.com/plotly/plotly.js/pull/7735)] |
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
Binary file modified
BIN
+550 Bytes
(100%)
test/image/baselines/date_axes_period2_ticklabelindex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.2 KB
test/image/baselines/zz-ticklabelindex-hidden-minor-ticks-one-label.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.6 KB
test/image/baselines/zz-ticklabelindex-hidden-minor-ticks-ticklabelstep.png
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 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,94 @@ | ||
| { | ||
| "data": [ | ||
| { | ||
| "showlegend": false, | ||
| "x": [ | ||
| "2023-01-01", | ||
| "2024-01-01", | ||
| "2025-01-01", | ||
| "2026-01-01", | ||
| "2027-01-01" | ||
| ], | ||
| "type": "scatter", | ||
| "xaxis": "x", | ||
| "yaxis": "y" | ||
| }, | ||
| { | ||
| "showlegend": false, | ||
| "x": [ | ||
| "2023-01-01", | ||
| "2024-01-01", | ||
| "2025-01-01", | ||
| "2026-01-01" | ||
| ], | ||
| "type": "scatter", | ||
| "xaxis": "x2", | ||
| "yaxis": "y2" | ||
| }, | ||
| { | ||
| "showlegend": false, | ||
| "x": [ | ||
| "2023-01-01", | ||
| "2024-01-01", | ||
| "2025-01-01", | ||
| "2026-01-01", | ||
| "2027-01-01" | ||
| ], | ||
| "type": "scatter", | ||
| "xaxis": "x3", | ||
| "yaxis": "y3" | ||
| } | ||
| ], | ||
| "layout": { | ||
| "width": 700, | ||
| "height": 700, | ||
| "grid": { | ||
| "rows": 3, | ||
| "columns": 1, | ||
| "pattern": "independent" | ||
| }, | ||
| "xaxis": { | ||
| "ticklen": 20, | ||
| "ticklabelindex": -1, | ||
| "tickformat": "%Y", | ||
| "ticklabelmode": "period", | ||
| "dtick": "M24", | ||
| "minor": { | ||
| "dtick": "M12", | ||
| "tick0": "2023-01-01" | ||
| }, | ||
| "title": { | ||
| "text": "Should display 2 ticks and labels 2023 and 2025 to the left of them." | ||
| } | ||
| }, | ||
| "xaxis2": { | ||
| "ticklen": 20, | ||
| "ticklabelindex": -2, | ||
| "tickformat": "%Y", | ||
| "ticklabelmode": "period", | ||
| "dtick": "M24", | ||
| "minor": { | ||
| "dtick": "M12", | ||
| "tick0": "2023-01-01" | ||
| }, | ||
| "title": { | ||
| "text": "Should display a label at 2024" | ||
| } | ||
| }, | ||
| "xaxis3": { | ||
| "ticklen": 20, | ||
| "ticklabelindex": -1, | ||
| "tickformat": "%Y", | ||
| "ticklabelmode": "period", | ||
| "ticklabelstep": 2, | ||
| "dtick": "M12", | ||
| "minor": { | ||
| "dtick": "M12", | ||
| "tick0": "2023-01-01" | ||
| }, | ||
| "title": { | ||
| "text": "Should display yearly ticks with labels at 2023 and 2025" | ||
| } | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
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.
@my-tien From the comments I understand you've modified the logic to add an additional minor tick before tick0, hence these changes, but could you explain the reason for adding that additional tick?