I'm trying to change my y-axis stroke color to be linear-gradient in recharts.
I know, I can define in defs element and inside define linerGradient element.
but when I set my stroke to be stroke: "url(#linear)", the y-axis stroke disappear.
this worked for me in a line chart but didn't work in the y-axis
<defs>
<linearGradient
id="linear"
x1="84"
y1="5"
x2="84.1"
y2="470"
>
<stop offset="0%" stopColor="#05a" />
<stop offset="100%" stopColor="#0a5" />
</linearGradient>
</defs>
<YAxis
tickMargin={8}
tickLine={false}
label={{
value: props.yAxisLabel,
position: "insideBottomLeft",
angle: -90,
offset: 0,
fill: "#A5A5A5",
}}
tick={{ fill: "#A5A5A5" }}
ticks={[60, 120]} //TODO: change to function
strokeWidth={10}
// stroke="#FF3C06"
stroke="url(#linear)"
style={{
strokeLinecap: "round",
}}
/>
any help?