apache / echarts

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

[Bug] Line/area series step on data with nulls produces unexpected results #20021

Open alxnddr opened 1 month ago

alxnddr commented 1 month ago

Version

5.5.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5AMYCGYVA5sAE7m0A0J6AE2aMiAbVoBZGL1i0AKgFcqM2gHUqAlXIAWClQDEOEFQGVmphdFoBdEgF8-6cjnxFUpMpRqyAbowA2SrT2jrB4VEZUhLCi_MQegsJi0Ar-_jywAKwADBkAbLmwKWkZAOyFAByFxf7WoR4U1HT-ENDK9aSMHFSMJhT-3kiwoIz0EBRE2QB0AEywDnHoeCwgdFTQmh3o9DBt9GAAcqn-0WAcSnF2JLZ2ANxAA

Steps to Reproduce

  1. Have a line/area cartesian chart where first and last data points are null (example)
  2. Set areaStyle: {}
  3. Set step: end and connectNulls: true props
  4. The chart does not appear correctly

Current Behavior

Area polygon is incorrect, the bottom of it is shifted:

Screenshot 2024-06-11 at 3 48 40 PM

Expected Behavior

The area polygon should be correct

Environment

- OS: macos
- Browser: chrome
- Framework: n/a

Any additional comments?

There is a related problem when connectNulls is false:

Screenshot 2024-06-11 at 3 48 19 PM copy
Ovilia commented 3 weeks ago

The polygon one is a bug. But the one in Any additional comments seems to be correct.

This looks as expected to me. Step can be one of 'start', 'middle', 'end'.