apache / apache/echarts

ECharts "Stacked Area Chart" does not work for not-synced time series data.

Open
#15,742 8 comments 7 reactions 0 assignees View on GitHub
bug en topic: stack waiting-for: community
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version
5.2.0

### Reproduction link
[https://jsfiddle.net/pgnjw27b/5/](https://jsfiddle.net/pgnjw27b/5/)

- Consistent Simple Version
https://jsfiddle.net/f7a4k5ng/2/

### Steps to reproduce
In the example just run the code a few times and see all the different ways the line's end up intersecting or being disconnected for each other. The line's are not 'stacked'.

![image](https://user-images.githubusercontent.com/10360237/133678608-9fd5eaee-369c-4fad-a64d-c1e95c3fbd8f.png)

This issue can lead to much larger problems in our data set where the difference produce results like

![image](https://user-images.githubusercontent.com/10360237/133678884-8db3fa2b-8204-4e6e-9111-434f14c433db.png)

If we pad the series with leading zero's so all of them share the same start date it looks more reasonable, but now we have a line rendered on top of every series with 0, which is not ideal.

![image](https://user-images.githubusercontent.com/10360237/133679048-bb4bd21c-4d6c-4808-8852-8778e6f39362.png)

It can be recreated by doing the following in any chart.

Create a graph with time type x axis and y value type axis

Add 2 series with time series data that have some dates which overlap, and some dates that do not.

Make the series stacked with 'stack:' and 'areaStyle:{}"

### What is expected?
The line series' which are in the same stack group (when areaStyle:{} is used) should always connect with other lines at common x values with no intersection of their areas.

### What is actually happening?
Line series' area can intersect with other line series' area under the same stack group.

---
Please let me know if this is something that cannot or will likely not be fixed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.