using scale.category10() and scale.sqrt with domain ? clamp ? range?

拥有回忆 提交于 2019-12-24 18:07:51

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!