I made a echart line graph.
Now, I want to add gradient color to it, as shown below:
In this link, it said it supports the setting as gradient color. But when I tried to do this as code given:
What to do?
Thanks in advance.
I made a echart line graph.
Now, I want to add gradient color to it, as shown below:
In this link, it said it supports the setting as gradient color. But when I tried to do this as code given:
What to do?
Thanks in advance.
areaStyle: {
color: new graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: 'rgb(255, 158, 68)'
},
{
offset: 1,
color: 'rgb(255, 70, 131)'
}])
}
Echart has graphic class, which gives you access to the Gradient Property. You can fine tune it to your needs giving start and end points to the colors in array.