admin管理员组文章数量:1402217
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 ?
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 ?
Share Improve this question asked Jan 18, 2020 at 11:40 AnkurAnkur 3,2095 gold badges30 silver badges57 bronze badges 4- Is this something you are looking for - ibb.co/kMpYQnq – Gautam Commented Jan 18, 2020 at 12:05
- @gautam Yes. Similar to that. It's just all bar should start from bottom. Not on top of another. – Ankur Commented Jan 18, 2020 at 12:29
- You can find the example here: echarts.apache/examples/en/… – Ray Commented Jan 20, 2020 at 5:07
- @Raymond It puts bar on top of bar. For ex one bar is of value 20 & another is 30 then on chart final bar should be 30 not 20+30=50. Current example provides a way to put one bar on top of another not overlappin. – Ankur Commented Jan 20, 2020 at 6:22
1 Answer
Reset to default 6This 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]
}
]
本文标签: javascriptOverlapping bar chart apache echarts baiduStack Overflow
版权声明:本文标题:javascript - Overlapping bar chart apache echarts baidu - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744344385a2601668.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论