效果:
渐变半透明颜色设置:
在series里面设置areaStyle属性:
areaStyle: {
normal: {
color: {
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0.1,
color: '#c55D34' // 0% 处的颜色
},
{
offset: 0.5,
color: 'rgba(255,185,91, 0.3)' // 0% 处的颜色
},
{
offset: 0.7,
color: 'rgba(255,185,91, 0.1)' // 0% 处的颜色
},
{
offset: 0.9,
color: 'rgba(0,0,0, 0.1)' // 100% 处的颜色
}
],
globalCoord: false // 缺省为 false
}
}