apache / apache/echarts

Datazoom silder trend is wrong when data span is large

Open
#15,688 1 comment 0 reactions 0 assignees View on GitHub
bug en
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version
5.2.0

### Reproduction link
[https://codepen.io/xxmushi/pen/rNwjWbW](https://codepen.io/xxmushi/pen/rNwjWbW)

### Steps to reproduce

```javascript
const POINT_COUNT = 1e3
const data= new Float64Array((POINT_COUNT 1) * 2)
let off = 0
for (let j = 0; j < POINT_COUNT; j++) {
values[off++] = j
values[off++] = Math.random() * 1000
}
data[off++] = 10000
data[off++] = 0
const option = {
dataZoom: [
{
type: 'slider',
id: 'slider',
xAxisIndex: [0],
dataBackground: {
areaStyle: {
color: 'rgba(128, 128, 128, 0)'
}
},
fillerColor: 'rgba(128, 128, 128, 0)',
borderColor: '#565656',
moveHandleSize: 0,
selectedDataBackground: {
lineStyle: {
color: '#f4f20b',
width: 0.5
},
areaStyle: {
color: 'rgba(128, 128, 128, 0)'
}
}
}
],
......,
series: [
{
type: 'line',
smooth: false,
data,
animation: false,
showSymbol: false,
dimensions: ['x', 'y'],
itemStyle: {
color: '#f4f20b'
}
}
]
}

```
The X-axis of Data jumps from 1000 to 10000

![Image of echarts](https://raw.githubusercontent.com/XXmushi/test123a/master/echarts.jpg)

### What is expected?
Datazoom silder don't filter the data when data span is larger

### What is actually happening?
silder trend is wrong when data span is large

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.