apache / apache/echarts

[Bug] Toggling y-axis in multi-y-axis chart doesn't update datazoom min/max correctly

Open
#20,791 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

5.6.0

### Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?code=MYGwpgZgLgBAvDA5AIwE4HsDuA7RBuAKGFQEsBzAC1gRRAFcx8CAPAQ2fhhgG1EBZdLgA0SACoNEIxAHUwAE0liKdRYgBipVQGVWUbXVwBdAugAOUEoM4BvAl2DoQ6VAC4eoSFBHFyVQ0LsYKHRHZHRmN2sYQK4SB2wtKABPcEiw1DkwVABhR2c3H0ooAF8Ari4IMF06VDBImDldVgAtEIBbSOKYLsDSwODHC1NOsphwMjBsORHAslJpnmtSmCX_QMaoFvbImKCk0zqYACIAZxASTNQj0YqSECgsgUy3I-xBMGvdpIBBZhITgCSUzAER4AAYRABGNblMaeF5ggCkny4fS4zF-_zc3F2tlhXA2rDcbGYN3KcwuQMyoIhuy46AgEBOYCgbkhAFYyVx2P8ADKsZBgED1BxOVwwDzQbq7NHlPH4wnE9hcmAUuRUkFslU8k78wXClYSvLiwpUaWw4qBGEwH5_E7Y3HRfGq-Yamnau16oUi40FcBSy0Wsny2Fqt1aukwUzoE4kCyCNyIUhFSSRnVeg1RUX5CXJs2y1FW0bM0hge08XGR7CsNqHRC8zyp52KngciEwABMAGZ2x2OwAWEQdyEADihXc5MEh_YA7EOAGxg62w5IHRPnbCMGXBqs1usAJV8ehVLe4kLBvd7HahY6nXZEs5Ei-X5VXdY3jBVGLt4anKtt_y_pCMpWgQxR4EAA

### Steps to Reproduce

1. Have a chart with 2 or more y-axis with differing min/max & minValue/maxValue
2. Toggle first y-axis off in legend
3. y-axis datazoom doesn't update min/max labels.

### Current Behavior

Datazoom with >2 y-axis doesn't account for both axes, it always defaults to the first. The values don't update when first axis is toggled, currently they get reset to NaN.

### Expected Behavior

The min/max value should be global for all y-axis when both are included in yAxis array of dataZoom. Datazoom labels should update when first y-axis is toggled.

### Environment

```markdown
- OS: macOS Sequoia
- Browser: Chrome
- Framework:
```

### 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.