docs(colorbar): log/date dtick string forms are not supported on color bars - #7991
Merged
camdecoster merged 1 commit intoSep 16, 2026
Merged
Conversation
CAOShurong
force-pushed
the
docs/colorbar-dtick-log-syntax
branch
from
August 29, 2026 17:14
9bc571a to
06654e5
Compare
camdecoster
requested changes
Sep 3, 2026
camdecoster
left a comment
Contributor
There was a problem hiding this comment.
Could you please rebase your branch to remove the reverted commit? Once you do that and address the comments, I'll be ready to approve.
Contributor
There was a problem hiding this comment.
Could you please delete this file? We don't need a draftlog for this change.
…r bars Document that dtick on color bars does not support special log/date string forms (*L<f>*, *D1*, *D2*, *M<n>*), since color bar axes are always linear and such string forms are silently ignored with step set to 1. Regenerate test/plot-schema.json and schema.d.ts types.
CAOShurong
force-pushed
the
docs/colorbar-dtick-log-syntax
branch
from
September 16, 2026 12:51
56782f5 to
5869085
Compare
camdecoster
approved these changes
Sep 16, 2026
camdecoster
left a comment
Contributor
There was a problem hiding this comment.
Thanks for the update!
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
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.
Fixes the documentation half of #7376.
colorbar.dtick(andcoloraxis.colorbar.dtick) inherits its description from the cartesiandtickattribute, which advertises the special log forms (L, D1, D2) and date form (M). None of them works on a color bar:type: 'linear'(mockColorBarAxisinsrc/components/colorbar/draw.js).clean_ticks.dticksilently falls back to the default step for ANY non-numeric value (src/plots/cartesian/clean_ticks.js: string dtick is only accepted on log/date axes).Measured behavior (verified against this branch's parent with a jsdom harness, heatmap spanning 10^0 to 10^9): setting
colorbar: {dtick: 'D1'}does not error and does not produce decade ticks - it degrades to a 1-unit linear step over a z-range of 1e9, i.e. ~56 million candidate tick labels (the renderer draws one garbage label per pixel of bar length, e.g.-0.056233M). The identicaldtick: 'D1'on a real log y-axis produces correct decade + minor ticks, confirming the colorbar path is the broken one. Numericdtickvalues work fine on the same color bar.This PR gives the color-bar
dtickattribute its own accurate description: only positive numbers are honored; the log/date string forms are silently ignored. No behavior change.test/plot-schema.jsonand the generated TS types are regenerated accordingly (the schema diff is exactly the new description).If maintainers would rather implement log-scale color bars than document the limitation, the mock axis type is the single place to start - happy to attempt that instead. But as long as strings are accepted-and-discarded, the docs should not claim they work.