series: [
{
name: '',
type: 'bar',
barWidth:20,
barCategoryGap: 50,
label: {
show: true,
position: 'right'
},
data: rains,
itemStyle: {
normal: {
//渐变修改(0, 0, 0, 1,)渐变方式四个位置依次为右、下、左、上,表示从上开始渐变
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
offset: 0,
color: '#a8ddf6'
}, {
offset: 1,
color: '#40a1fb'
}]),
}
},
},
]
Echarts渐变
最新推荐文章于 2023-11-28 09:45:48 发布