[Bug] Last series gets stuck on when toggling off visibility
- 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):

### 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
Assessment
This issue has not been assessed yet.