echarts同时使用显示两条折线,为什么会出现值累加?const option = {
title: {
// text: '折线图堆叠'
},
tooltip: {
trigger: 'axis'
},
legend: {
data:['上周','当周'],
textStyle: {
color: '#fff'
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['周一','周二','周三','周四','周五','周六','周日'],
axisLine: {
lineStyle: {
type: 'solid',
color: '#fff',//左边线的颜色
width:'1'//坐标线的宽度
}
},
axisLabel: {
textStyle: {
color: '#fff',//坐标值得具体的颜色
}
}
},
yAxis: {
type: 'value',
axisLine: {
lineStyle: {
type: 'solid',
color: '#fff',//左边线的颜色
width:'1'//坐标线的宽度
}
},
axisLabel: {
textStyle: {
color: '#fff',//坐标值得具体的颜色
}
},
splitLine: {
show: true,
lineStyle:{
color:'#3e4555',
type:'solid'
}
}
},
series: [
{
name:'上周',
type:'line',
stack: '总量',
data:[100, 132, 101, 134, 90, 230, 210],
itemStyle : {
normal : {
color:'#03c4d5',
lineStyle:{
color:'#05b0c2'
}
}
}
},
{
name:'当周',
type:'line',
stack: '总量',
data:[100, 182, 191, 234, 290, 330, 310]
},
],