echarts icon indicating copy to clipboard operation
echarts copied to clipboard

数据堆叠:当一条线为整数,一条线为负数的情况下数据无法堆叠

Open hanbinggan opened this issue 9 years ago • 1 comments

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 [其他信息]

hanbinggan avatar Dec 07 '16 06:12 hanbinggan

目前正负的堆叠是分开的

pissang avatar Dec 12 '16 03:12 pissang