Open ShitalUnde opened 2 years ago
That is because it's not a color per se and gradients in SVG work differently, see this Stackoverflow post for reference
The gauge-chart code itself does this:
let innerArc = svg
.append('path')
.attr('d', gaugeArc)
.attr('fill', color)
.attr(
'transform',
'translate(' +
(chartHeight + offset * 2) +
', ' +
(chartHeight + offset) +
')',
)
fill itself takes a <paint>
type as param, see this MDN page for reference (also follow the link to the paint definition, there you'll see what you can actually pass to fill).
I do not have a solution right now, as I'm struggling with the exact same problem 😅
arcColors: ['linear-gradient(red,yellow,orange)'],
its not working