FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Set default `layout.axis.tickmode` to `'sync'` when axis is overlaying by emilykl · Pull Request #7684 · plotly/plotly.js · GitHub

Set default layout.axis.tickmode to 'sync' when axis is overlaying - #7684

Merged
emilykl merged 13 commits into
v4.0from
shared-axis-lines-default
Jun 23, 2026
Merged

Set default layout.axis.tickmode to 'sync' when axis is overlaying#7684
emilykl merged 13 commits into
v4.0from
shared-axis-lines-default

Conversation

emilykl commented Jan 6, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Closes #7683

This PR slightly modifies the default tickmode logic, such that tickmode defaults to 'sync' rather than 'auto' for overlaying axes. Motivation is explained in the linked issue.

Note: One case is excluded: When the overlaying axis is categorical (or multicategory), tickmode continues to default to 'auto' rather than 'sync', as 'sync' causes unexpected behavior with categorical axes and is probably never intended by the user.

This PR also fixes a bug where showexponent/showtickprefix/showticksuffix values of 'first' or 'last' did not render exponents/prefixes/suffixes on overlaid axes set to sync.

emilykl force-pushed the shared-axis-lines-default branch from e7ee5b3 to 2be45e2 Compare January 7, 2026 21:29
emilykl force-pushed the shared-axis-lines-default branch 2 times, most recently from 7230cfb to 7d71516 Compare January 21, 2026 23:36
emilykl requested a review from camdecoster January 21, 2026 23:56
camdecoster previously approved these changes Jan 23, 2026

camdecoster left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good! I left a few small syntax suggestions, but it's good to go as is.

Comment thread src/plots/cartesian/dragbox.js Outdated
emilykl force-pushed the shared-axis-lines-default branch from 0251716 to 79bf862 Compare January 26, 2026 16:57

archmoj commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

Hi @emilykl,
Thank you for the PR. Please note that the draftlog for this change is missing.
I'm wondering this PR could/should be considered a breaking change for v3.
If you are planning to release a major version, then this PR may belong to v4.
cc: @alexcjohnson

emilykl commented Jan 26, 2026

Copy link
Copy Markdown
Contributor Author

@archmoj Thanks for the catch -- I've added a draftlog!

It's a good point that this is a backward-incompatible change and so strictly speaking should only be introduced in a major version. I'm not psyched about bumping the version number just for this change, but perhaps there are a few other changes we could introduce at the same time. On the other hand, do you know if there are instances in the past where we've made an exception and introduced a change in a minor version?

archmoj commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

do you know if there are instances in the past where we've made an exception and introduced a change in a minor version?

No I don't recall. Since v1 we tried to introduce breaking changes in major versions only.
At the moment there is another PR (#7675) merged to the master which could/should considered a breaking change i.e. related to bars with text.
In addition you may also include the following PRs and issues to release v4:
#7696, #7692, #7680, #7536,
#7623, #7598, #7174, #7026.

emilykl commented Feb 3, 2026

Copy link
Copy Markdown
Contributor Author

Note: Holding off on merging this PR until v4 release

camdecoster added this to the v4.0.0 milestone Feb 3, 2026

Copy link
Copy Markdown
Collaborator

A related change that we've talked about a bit, and would be nice to get in alongside this if we're including it in a major release: making a small adjustment to the ranges of one or both of the axes with synced ticks so that the tick values are more precise and (hopefully) need fewer digits displayed.

emilykl changed the base branch from master to v4.0 June 9, 2026 16:10
emilykl force-pushed the shared-axis-lines-default branch from 72f92a2 to 8c69898 Compare June 9, 2026 16:15

camdecoster left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good. You just need to commit the updated types.

emilykl force-pushed the shared-axis-lines-default branch from 34c90b4 to 8ede0f7 Compare June 18, 2026 16:30
emilykl merged commit b070ce6 into v4.0 Jun 23, 2026
83 checks passed
emilykl deleted the shared-axis-lines-default branch June 23, 2026 16:09
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default gridline behavior for overlaid axes is ugly and hard to read

5 participants


Back | FazBrowse Home | New Git URL