apache / apache/echarts

[bug] Zoom range not aligned with log scale in dataZoom component

Open
#20,927 2 comments 7 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.5.0

### Link to Minimal Reproduction

https://codepen.io/Artignan/pen/vEELGqm

### Steps to Reproduce

1. Make an y-axis with logscale and big values
2. Add an datazoom on y-axis

### Current Behavior

When using a logarithmic axis, the dataZoom component doesn't behave correctly for lower values. The zoomed range does not follow the logarithmic progression — pixel movements in the dataZoom slider are linearly mapped and do not match the corresponding distances on the axis. This leads to inconsistent zoom behavior, especially for small values.

### Expected Behavior

The dataZoom component should respect the logarithmic scale of the axis.
When the axis is set to 'log', pixel movements in the dataZoom slider should map proportionally to the logarithmic spacing of the axis ticks. This would ensure consistent zoom behavior across the entire scale, including for lower values.

### Environment

```markdown
- OS:Mac OS Sequoia 5.4.1
- Browser: Firefox 137.0.2
- Framework: Echart 5.5.0
```

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