apache / apache/echarts

[Bug] The timeline is incorrect @echarts-x/custom-stage

Open
#21,254 1 comment 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

### Link to Minimal Reproduction

https://github.com/apache/echarts-custom-series/tree/main/custom-series/stage/examples

### Steps to Reproduce

Download the example repository code, Modify the "data" in the configuration.
If there are time spans across days in the data, the x-axis time display will be incorrect.

const data = [
[new Date('2024-09-07 06:12'), new Date('2024-09-07 06:12'), '清醒'],
[new Date('2024-09-07 06:15'), new Date('2024-09-07 06:18'), '清醒'],
[new Date('2024-09-07 08:59'), new Date('2024-09-07 09:00'), '清醒'],
[new Date('2024-09-07 05:45'), new Date('2024-09-07 06:12'), '快速动眼'],
[new Date('2024-09-07 07:37'), new Date('2024-09-07 07:56'), '快速动眼'],
[new Date('2024-09-07 08:56'), new Date('2024-09-07 08:59'), '快速动眼'],
[new Date('2024-09-07 09:08'), new Date('2024-09-07 09:29'), '快速动眼'],
[new Date('2024-09-07 05:45'), new Date('2024-09-07 06:12'), '快速动眼'],
[new Date('2024-09-07 03:12'), new Date('2024-09-07 03:27'), '浅睡'],
[new Date('2024-09-07 04:02'), new Date('2024-09-07 04:36'), '浅睡'],
[new Date('2024-09-07 04:40'), new Date('2024-09-07 04:48'), '浅睡'],
[new Date('2024-09-07 04:57'), new Date('2024-09-07 05:45'), '浅睡'],
[new Date('2024-09-07 06:12'), new Date('2024-09-07 06:15'), '浅睡'],
[new Date('2024-09-07 06:18'), new Date('2024-09-07 07:37'), '浅睡'],
[new Date('2024-09-07 07:56'), new Date('2024-09-07 08:56'), '浅睡'],
[new Date('2024-09-07 09:00'), new Date('2024-09-07 09:08'), '浅睡'],
[new Date('2024-09-07 09:29'), new Date('2024-09-07 10:41'), '浅睡'],
[new Date('2024-09-07 12:36'), new Date('2024-09-07 12:50'), '浅睡'],
[new Date('2024-09-07 12:50'), new Date('2024-09-07 13:10'), '深睡'],
[new Date('2024-09-06 23:37'), new Date('2024-09-07 04:02'), '深睡'],
[new Date('2024-09-07 04:36'), new Date('2024-09-07 04:40'), '深睡'],
[new Date('2024-09-07 04:48'), new Date('2024-09-07 04:57'), '深睡'],
];

### Current Behavior

Image

Image

### Expected Behavior

I hope the time display across days can be handled correctly

### Environment

```markdown
- OS: win11
- Browser:Chrome 140.0.7339.80
- Framework: js
```

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