apache / apache/echarts

dataZoom does not work with Tree charts

Open
#16,743 5 comments 0 reactions 0 assignees View on GitHub
bug en pending waiting-for: community
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

5.3.0

### Link to Minimal Reproduction

_No response_

### Steps to Reproduce

I am trying to add zoom in and out for my tree chart. Below are the options that I tried: Though I see dataZoom buttons in the toolbox, clicking on them does not zoom in or out. I can however zoom in using mouse when I enable roam: true, but not via the buttons. I am looking for zooming in and out using buttons. Kindly let me know if this is a known issue.

```ts
this.myChart.setOption(
(option = {
tooltip: {
trigger: 'item',
triggerOn: 'mousemove'
},
toolbox: {
show : true,
feature : {
restore : {show: true},
dataZoom : {
show : true
}
}
},
series: [
{
type: 'tree',
data: [tree],
// roam: true,
}
]
})
);
```
### Current Behavior

zoom does not work in dataZoom buttons in toolbox for tree.

### Expected Behavior

When user clicks in zoom in, it should zoom in similar it to how it does when roam is set to true via mouse. I am looking for same feature using buttons.

### Environment

```markdown
- OS:
- Browser:
- 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.