series: [
{
name: '值',
type: 'bar',
stack: '總量',
//設置柱狀圖大小
barWidth : 20,
//設置柱狀圖漸變顏色
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(
0, 0, 1, 0, // 0,0,1,0表示從左向右 0,0,0,1表示從右向左
[
{offset: 1, color: '#83bff6'},
{offset: 0, color: '#188df0'}
]
)
}
},
data:valueArr
}
]