apache / apache/echarts

[Bug] Interrupted lines can draw ghost lines

Open
#21,565 5 comments 0 reactions 0 assignees View on GitHub
bug en pending
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

6.0.0

### Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=bVA9C8IwEN39Fbd16WD8NuLg6Cw4WDoEGyRQk9JGaZH-d1_SWK0aeCH3Lu_u3ZnCKqNpS48RUb2rVcX9k8g2heQUnYWVF1M2UezZTFjBKaFxTMSACTAFZl36deagFsASWAHrQZpBzaBmUDOo2UCd4t06wvU6GXP9cqR0pTIZ_HjLe53JmsOTp65KH0V-k4dCaO56dayo_7CVFaX1PMcYXePmzxbu7ktoifrhs6_KafkyXMlSSUgTn-sK9CvrJ0xmMc3T98QJljSI3Wp-CH3L808O2118xmsXh7Dng_tcaRl5qsWdjtrNEw&enc=deflate

### Steps to Reproduce

Opening sandbox code should show this, two lines in one graph. Lower line with 3 data points, then an interruption with a `null` data point, then the upper line with 2 data points.

Image

Scrolling to the right (note the numbers on the x-axis) makes the third data point of the lower line disappear. Instead, a ghost line connecting the second data point of the lower line and the first data point of the upper line appears:

Image

### Current Behavior

The ghost line appears. Apparently, all data points outside the visible range get totally ignored, even if they're data points for interrupting lines.

### Expected Behavior

Lines should stay interrupted, no ghost line appearing.

### Environment

```markdown
- OS: Debian 13
- Browser: Firefox 140 ESR
- Framework: (none)
```

### Any additional comments?

_No response_

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.