I have a an SVG where I am targeting a certain path element with id: _116.
I can fill the path easily with a solid colour by doing this:
d3.select("path#_116").style("fill", 'blue');
However lets say I have a linear scale colour so that I want a gradient applied to it:
let scale = d3.scaleLinear()
.domain([1,10])
.range(["white", "blue"]);
d3.select("path#_116").style("fill", scale);
This just doesn't work. For some reason it's setting the fill to a black colour (#212a39) which seems like is coming from the sibling element as shown below:
Any ideas on what's happening here?
