Overlapping bar chart apache echarts baidu

不想你离开。 提交于 2020-02-24 00:43:38

问题


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 with echarts ?


回答1:


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]
    }
]


来源:https://stackoverflow.com/questions/59800234/overlapping-bar-chart-apache-echarts-baidu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!