问题
Who is able to explain me this code:
var hue = d3.scale.category10();
var luminance = d3.scale.sqrt()
.domain([0, 1e6])
.clamp(true)
.range([90, 20]);
It's for L*a*b notation color
Can someone explain me step by step with example please this part of code? Because I have percent value and I'm thinking the domain or range are not for percent value in luminance function for this luminance(d.sum); I have always this value for luminance: 89.9999951176645
Is that the problem because my d.sum are around 0.9 and 0.9
来源:https://stackoverflow.com/questions/21684649/using-scale-category10-and-scale-sqrt-with-domain-clamp-range