and I want to use a donut-chart with gradient for darkmode. For that I need 8 linear gradients with each 5 stops. In each stops are diffrent opaccity. Here an example https://codepen.io/thng17/pen/vYZvQMG.
I was searching for a solution but don't find someting that works. For the stop problem, was a solution with Highcharts.Color(...).setOpacity(), but there was an Error that said that the typeof Color is not callable.
I was searching for that Problem but didn't find a solution for it. Also how can appply more than one linear gradient in one categories?
Side Note: I'm using Angular and Typscript
Thats what I codeing before:
Code: Select all
series: [
{
type: 'pie',
name: 'VG',
data: [
{
name: 'Example',
y: 15,
color:{
linearGradient: {x1: 123, y1: 0, x2: 123, y2: 1 },
stops: [
[0, Highcharts.Color('#adced3').setOpacity(0.7)],
[0.359375, Highcharts.Color('#ADCED3').setOpacity(0.4)],
[0.6, Highcharts.Color('#ADCED3').setOpacity(0.33)],
[0.8, Highcharts.Color('#ADCED3').setOpacity(0.4)],
[0, Highcharts.Color('#ADCED3').setOpacity(0.7)],
]
}
},
{
name: 'Exampl2',
y: 20,
color: "var(--color-donut-chart2)"
},
{
name: 'Example3',
y: 25,
color: "var(--color-donut-chart3)"
},
],
showInLegend: true,
}