apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
59.99k stars 19.59k forks source link

[Bug] Stacked line with areaStyle is displayed despite data having 0 values #16739

Open marcomaisel opened 2 years ago

marcomaisel commented 2 years ago

Version

5.3.1

Link to Minimal Reproduction

https://jsfiddle.net/bh6rayzs/1/

Steps to Reproduce

Current Behavior

At a wide zoom level, you can see the serie's line, which is stacked on top of the other serie's line and has data with some '0' values, sticking out behind the other line. If you zoom in further, it disappears and everything is displayed correctly.

Current behaviour on wider zoom levels. There is a lot of red although most of its series data value is '0': area-simple (1)

If you scroll in a bit you can see how it actually should look like: area-simple

Expected Behavior

The stacked serie's line should only be displayed on top of the other serie's line if it has data with values other than '0'. The data should be displayed correctly on all zoom levels.

Environment

- OS: macOS Monterey
- Browser: Chrome 99, Firefox 97

Any additional comments?

The app shows data for every minute for a whole day with the possibility to zoom via a datazoom.

stas-sl commented 2 years ago

Also faced a similar issue, but I solved it by replacing all 0 by null or '-'

marcomaisel commented 2 years ago

Thanks for your suggestion! Replacing 0 with null makes it significantly better for now and it doesn't look as wrong as before. However, this does not make the rendering correct yet. On wider zoom levels there is still the problem that the representation of each day is not a straight stacked stepped line (with step: start).

Current behaviour on wider zoom levels with 0 replaced with null: Screenshot 2022-04-26 at 08 23 36

Correct rendering when scrolled in a bit more: Screenshot 2022-04-26 at 08 23 25

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

gehringf commented 3 months ago

The issue still exists