echarts
echarts copied to clipboard
数据堆叠:当一条线为整数,一条线为负数的情况下数据无法堆叠
One-line summary [问题简述]
数据堆叠:当一条线为整数,一条线为负数的情况下数据无法堆叠
Expected behaviour [期望结果]
当一条线为整数,一条线为负数的情况下数据可以正常堆叠
ECharts option [ECharts配置项]
option = {
title: {
text: '堆叠区域图'
},
tooltip : {
trigger: 'axis'
},
legend: {
data:['邮件营销','联盟广告']
},
toolbox: {
feature: {
saveAsImage: {}
}
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis : [
{
type : 'category',
boundaryGap : false,
data : ['周一','周二','周三','周四','周五','周六','周日']
}
],
yAxis : [
{
type : 'value'
}
],
series : [
{
name:'联盟',
type:'line',
stack: '总量',
areaStyle: {normal: {}},
data:[220, 10, 10, 10, 290, 330, 310]
},
{
name:'邮件营销',
type:'line',
stack: '总量',
areaStyle: {normal: {}},
data:[120, -200, -300, -200, 90, 230, 210]
},
{
name:'联盟广告',
type:'line',
stack: '总量',
areaStyle: {normal: {}},
data:[220, 10, 10, 10, 290, 330, 310]
}
]
};
Other comments [其他信息]
目前正负的堆叠是分开的