apache / apache/echarts

[Bug] Order of data point timestamps reverse step option on line serie

Open
#20,658 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

5.6.0

### Link to Minimal Reproduction

https://jsfiddle.net/adn0qyzj/

### Steps to Reproduce

1. Create line graph with time axis
2. Create serie with `step` option set to `end`
3. Add data points for the serie in descending order (latest value first)
4. Line is rendered correctly but `step` option is reversed

... or open reproduction link and observe differences between series.

### Current Behavior

Order of timestamps in `serie.data` array reverse the `step` option behaviour from `end` to `start` and vice versa on time axis. Timestamp order should not have affect to this because order of the data point is always from first to last.

### Expected Behavior

Order of datapoints should not affect rendering of stepped lines.

Workaround for this is obvious: reverse the `serie.data` array.

### Environment

```markdown
- OS: Windows 10
- Browser: Firefox 133
- Framework: none
```

### Any additional comments?

Version 4.7.0 is also affected by this.

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.