apache / apache/echarts

[Bug] `dataZoom.filterMode: 'none'` breaks sampling

Open
#21,512 3 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

6.0.0

### Link to Minimal Reproduction

https://codepen.io/ransoing/pen/pvbOLPq

### Steps to Reproduce

Uncomment the `// filterMode: 'none',` line in the javascript to see the data change resolution

### Current Behavior

When using a high resolution dataset and turning on `series-line.sampling`, the chart should always show full resolution data when you zoom in a sufficient amount. However, when `dataZoom.filterMode` is set to `none` or `empty`, the chart no longer performs progressive disclosure, and only shows the lowest-resolution sampled data regardless of how far you zoom in.

With `filterMode: 'filter'` and `sampling: 'lttb'`, zoomed in on a high-res dataset:

Image

The same situation as above, but with `filterMode: 'none'`:

Image

### Expected Behavior

When `dataZoom.filterMode` is set to `none`, and when zoomed in enough, the chart should look the same whether or not sampling is turned on. The chart should look like below with `dataZoom.filterMode: 'none'` and `sampling: 'lttb'`:

Image

Instead, the chart looks like the second screenshot I posted in "Current Behavior".

### Environment

```markdown
- OS: Mac OS 14.8.3
- Browser: Chrome 144
- 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.