echarts.graphic.LinearGradient
new echarts.graphic.LinearGradient(a,b,c,d,arr)
a ,b,c,d为0,1
a:1 arr中的颜色右到左
c:1 arr中的颜色左到右
b:1 arr中的颜色下到上
d:1 arr中的颜色上到下
具体用法
itemStyle: {
color: new echarts.graphic.LinearGradient(
0, 1, 0, 0,
[
{offset: 0, color: '#17CC8C'},
{offset: 0.37, color: '#0D9BFC'},
{offset: 0.67, color: '#38D7F4'},
{offset: 1, color: '#666'}
]
)
}