add range to color scales?
Opened this issue · 3 comments
Deleted user commented
Hi Spencer - it would be nice to have the ability to specify a range for the color scales. What do you think about adding this? Was there a reason you didn't include it before?
spencer516 commented
Wouldn't that just be an ordinal scale? For example, the category10
color scale is just an ordinal scale with a predefined set of 10 colors: https://github.com/d3/d3-scale/blob/master/src/category10.js
Deleted user commented
ok, good point - a generic ordinal-scale
helper would be great for this kind of thing
spencer516 commented
You said that and I thought "Of course there's an ordinal-scale
helper"...whoops. Agreed. I'll try to add that shortly.