I have this code and i'd like to color the arc relatively to the value, passing a range of two colors (i.e. ['#f00', '#ff0]).
I can't find a way to declare a scale that builds me the right colors.
And i can't find anything on docs either...
This is the codepen where i would like to implement this
https://codepen.io/adeveloperdiary/pen/OydzpG
This is how i tried with no success
const colorRange = ['#f00', '#0f0'];
const colorScale = d3.scaleOrdinal()
.range([0, 100])
.domain(colorRange);
console.log(colorScale(75));
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/5.2.0/d3.min.js"></script>