series: [
{
name: '教师',
type: 'line',
stack: '总量',
data: [120, 132, 101, 134, 90, 230, 210],
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0, color: '#40CFFF' // 0% 处的颜色
}, {
offset: 1, color: 'transparent' // 100% 处的颜色
}]
), //背景渐变色
},
},
},
{
name: '学生',
type: 'line',
stack: '总量',
data: [220, 182, 191, 234, 290, 330, 310],
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0, color: '#FFD103' // 0% 处的颜色
}, {
offset: 1, color: 'transparent' // 100% 处的颜色
}]
), //背景渐变色
},
},
}
]