简体   繁体   中英

Overlapping bar chart apache echarts baidu

I want to create bar chart with multiple series overlapping each other.

Stack bar chart places bar on top of another bar.

I want all bar to start from the bottom like below example.

在此处输入图片说明

Is there any way to achieve this withecharts ?

This example

added

series: [
    {
        name: 'Forest',
        type: 'bar',
        barGap: '-100%',  // this changed
        barCategoryGap: '80%', // this changed
        label: labelOption,
        data: [320, 332, 301, 334, 390]
    },
    {
        name: 'Steppe',
        type: 'bar',
        label: labelOption,
        data: [220, 182, 191, 234, 290]
    },
    {
        name: 'Desert',
        type: 'bar',
        label: labelOption,
        data: [150, 232, 201, 154, 190]
    },
    {
        name: 'Wetland',
        type: 'bar',
        label: labelOption,
        data: [98, 77, 101, 99, 40]
    }
]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM