Stacked line chart with negative values
See original GitHub issueOne-line summary [问题简述]
When i have a line with some negative values (e.g. [3, 1, 2, -1, -3, 1, 3]) and my stack is always 1, i want that the stack also work for “-1” and “-3”.
Version & Environment [版本及环境]
- ECharts version [ECharts 版本]: 4
- Browser version: all browsers
- OS Version: all OS
ECharts option [ECharts配置项]
option = {
xAxis : [
{
type: 'category',
data: [1,2,3,4,5,6,7,8,9]
}
],
yAxis : [
{
type : 'value'
}
],
series : [
{
name:'stack',
type:'line',
stack: 'stack',
data:[3, 1, 2, -1, -3, 1, 3]
},
{
name:'stack',
type:'line',
stack: 'stack',
areaStyle: {},
data:[1, 1, 1, 1, 1, 1, 1]
}
]
};
Expected behaviour [期望结果]
I get the following result with the option above.
But i would expect something like this:
Other comments [其他信息]
Example of the bug https://jsfiddle.net/ykb5n0pa/
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Creating a stacked area chart which shows negative values
Using this data I have created a stacked column chart to represent the profit values in the various columns through time. Time will...
Read more >How to Create Stacked Area Chart with Negative Values in ...
In this article, we have illustrated 3 easiest examples to plot stacked area chart with negative values in Excel.
Read more >Stacked area chart with negative values - Highcharts
When negative and positive values are both rendered from 0 it creates large peaks and valleys in the chart that make individual values...
Read more >Stacked Column Chart with Negative Values - AnyChart
Stacked Column chart with negative values shows loss and profit from selling several products in several states. Stacked mode helps to compare the ......
Read more >Stacked Area Chart - Negative Values - Excel Help Forum
Use a normal area chart and calculate new stacked values. You may need to alter the order of the series so the final...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here’s the proposed fix PR: #17086
@pissang Perfect, I’ll get to work on it right away!