Skip to content

fix(scale): recompute classes() breaks when domain() changes#389

Open
SAY-5 wants to merge 1 commit into
gka:mainfrom
SAY-5:fix-scale-classes-domain-order
Open

fix(scale): recompute classes() breaks when domain() changes#389
SAY-5 wants to merge 1 commit into
gka:mainfrom
SAY-5:fix-scale-classes-domain-order

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 13, 2026

Calling scale().classes(n) before .domain([min,max]) computed class breaks against the default [0,1] range, so the result differed from the reverse call order. .domain() now recomputes the breaks when classes were requested as a count. Closes #371.

@SAY-5 SAY-5 requested a review from gka as a code owner May 13, 2026 00:11
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 13, 2026

🦋 Changeset detected

Latest commit: e15728d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
chroma-js Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

classes() and domain() order depedendent

1 participant