在series中添加以下语句
itemStyle: {
normal: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [{
offset: 0,
color: '#f3d015' // 0% 处的颜色
}, {
offset: 1,
color: '#f94729' // 100% 处的颜色
}],
global: false // 缺省为 false
}
}
}