-
-
Notifications
You must be signed in to change notification settings - Fork 547
Open
Description
Hi,
I noticed a bug on version 3.1.2 which was hard to understand because of the order I called the function, I don't think that should be the case.
console.log(chroma.scale(['black', 'white']).domain([-2,2]).classes(5).colors(5, 'hex'))
# ['#000000', '#404040', '#808080', '#bfbfbf', '#ffffff']
console.log(chroma.scale(['black', 'white']).classes(5).domain([-2,2]).colors(5, 'hex'))
# ['#000000', '#000000', '#000000', '#ffffff', '#ffffff']The same goes when manually picking colors on the range with scale(x): if the .classes() function is called before the .domain(), the results are completely different and, in my case, no longer respect the number of classes (goes from 5 to 2).
It might be related to #329 but I'm not sure
gka
Metadata
Metadata
Assignees
Labels
No labels