apache / apache/echarts

[Bug] DataZoom preview for multiple x-values incorrect

Open
#18,790 3 comments 0 reactions 0 assignees View on GitHub
bug en topic: dataZoom
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

5.4.2

### Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=line-simple&code=CYQwLiAEC8kNoChLwIwDYAcaUFYDsATAAwkmQA0RAuuZEqptvsaShdbfXOlroaUQIUAdgFcANuJp1k3RnxYkAzO2lceTfqRXkUJNbI0KBAFgp6O6-c1OryV3jdI47MyFQDcCBAHsADmAAlj7CMJAA3vTiAKYA5tHCwABcEQC-9sigEABaPj4AtimIyMiRJSVgAJ5-0SkA5ADO4oHA0QBOdRnlkA0AFj4A7ilgbaLRXeUNEG1gKUQTJQnJkBYLqfQ09AAeAIJbgQ0pZRXVtZB1QfnRdfTp9JV7B0f0yFU19QBuIOJjnbddDXagWih3gLwi4OQwhAV3qAGUfKI2gBjaIrP7dSBvM51ZrCa4LTLgEApLIgQmQEBtaIgOFVGJHdblO7ITapDxAA

### Steps to Reproduce

* use step data with multiple same x values of type [time, value]
* configure x axis as time
* add dataZoom as slider

### Current Behavior

* dataZoom preview is not in sync with real graph

![preview_data_zoom](https://github.com/apache/echarts/assets/31829974/7c1b2519-618c-467e-b4b8-9882135e0028)

### Expected Behavior

* steps are shown correctly as rectangular line
* preview is in sync with chart without offset

### Environment

```markdown
- OS: all
- Browser: all
- Framework: official editor / echarts@5.4.2
```

### Any additional comments?

I ran into this issue while creating from normal data step data by adding x/y value pairs.

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.