I’m stuck on a little problem, I don’t know JS at all. I would like to put half of color on the left, the other half on the right, while there is one that: var colour = d3.scaleOrdinal(d3.schemeCategory20);
which bothers me.
How to add a color for each “piece” of the donut? I want this color on the left : #273c4e
and this one on the right : #b7ce39
I try this : length = someInteger; colour = d3.scale.linear().domain([1,length]).interpolate(d3.interpolateHcl).range([d3.rgb("#273c4e"), d3.rgb('#b7ce39')]);
Thank you.
Link of the donut : Click