apache / apache/echarts

[Bug] Last series gets stuck on when toggling off visibility

Open
#20,824 4 comments 2 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

5.6.0

### Link to Minimal Reproduction

~~https://codesandbox.io/p/sandbox/hjdr2v~~
Edit: More minimal example: https://codesandbox.io/p/sandbox/apache-echarts-demo-forked-cph6d6

### Steps to Reproduce

Toggle off all the series. The last one will not toggle off, and will get stuck rendered in that state. (It seems to do the same behavior no matter which you turn off last):

![Image](https://github.com/user-attachments/assets/4739a79c-1a43-4932-839a-f8678267fd8e)

### Current Behavior

Final series to be toggled off stays rendered on the chart.

### Expected Behavior

Final series to be toggled off should hide like the rest of the series.

### Environment

```markdown
- OS: EndeavourOS Linux x86_64
- Browser: Chromium Version 136.0.7064.0 (Developer Build) (64-bit), Firefox 137.0b5 (64-bit)
- Framework: React 19
```

### Any additional comments?

_No response_

Edit: Switched example to vanilla js version instead of react + echarts-for-react
Edit2: Updated to a more minimal example

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.