Skip to content

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

@yc0123450

Description

@yc0123450

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

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

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions