[Bug] Update from 5 to 6 causes trigger multiple toolbox datazoom
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### Version
6.1.0
### Link to Minimal Reproduction
https://jsfiddle.net/am6xs7bv/
### Steps to Reproduce
1. It enabled datazoom toolbox multiple times. Echarts 5 wouldn't have this issue.
chart.dispatchAction({
type: 'takeGlobalCursor',
key: 'dataZoomSelect',
dataZoomSelectActive: true,
});
### Current Behavior
Click "Enable drag zoom".
Zoom to half of chart.
Click "Restore" button that is part of echarts.
Click "Enable drag zoom".
Zoom to half of chart. Weird wrong zoom.
### Expected Behavior
Should zoom correctly second time.
### Environment
```markdown
- OS:
- Browser:
- Framework:
```
### Any additional comments?
_No response_
Contributor guide
Research direction
Start with the linked JSFiddle minimal reproduction and trace the dataZoom toolbox behavior around dispatchAction with type takeGlobalCursor and dataZoomSelectActive. Reproduce the sequence of enabling drag zoom, zooming, restoring, and enabling it again; done means the second zoom behaves correctly without the reported extra or incorrect zoom.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100