Skip to content

[Bug] 6.0.0版本的图表时间轴在series有多个系列时,会出现位置偏移, #21256

@wangz1999

Description

@wangz1999

Version

6.0.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=area-time-axis

Steps to Reproduce

打开编辑器。填入该配置项

option = {
"textStyle": {
"color": "black"
},
"color": [],
"axisPointer": {
"link": {
"xAxisIndex": "all"
}
},
"dataZoom": [
{
"type": "slider",
"xAxisIndex": [
0
],
"start": 0,
"end": 100,
"minSpan": 0,
"maxSpan": 100
},
{
"type": "inside",
"xAxisIndex": [
0
],
"start": 0,
"end": 100,
"minSpan": 0,
"maxSpan": 100
}
],
"title": {
"text": "钢\n筋\n计\n数\n据",
"left": "left",
"top": "middle",
"textStyle": {
"fontSize": 15,
"fontWeight": "600",
"color": "black"
}
},
"tooltip": {
"trigger": "item",
"axisPointer": {
"type": "cross",
"label": {
"backgroundColor": "#6a7985"
}
}
},
"legend": {
"x": "88%",
"y": "center",
"orient": "vertical",
"type": "scroll",
"height": "80%",
"itemGap": 8,
"pageIconSize": 12,
"pageTextStyle": {
"color": "https://github.com/apache/echarts/issues/666"
},
"textStyle": {
"color": "black"
},
"triggerEvent": true,
"tooltip": {
"show": true,
"trigger": "item"
},
"data": [
"EGJJ3-1温度",
"EGJJ1-2温度",
"EGJJ5-2温度",
"EGJJ2-2温度"
]
},
"toolbox": {
"feature": {
"saveAsImage": {
"show": true,
"iconStyle": {
"borderColor": "#409eff"
},
"backgroundColor": "#ffffff"
}
}
},
"grid": {
"left": "3%",
"right": "12%",
"bottom": "5%",
"containLabel": true
},
"xAxis": [
{
"type": "time",
"boundaryGap": false,
"axisLine": {
"onZero": true
},
"slient": false,
"triggerEvent": true,
"axisLabel": {
"rotate": 20,
"margin": 15
},
"data": []
}
],
"yAxis": [
{
"type": "value",
"name": null,
"axisLabel": {
"fontSize": 16
},
"position": "left",
"nameLocation": "end",
"alignTicks": true,
"nameTextStyle": {
"padding": [
-30,
0,
0,
0
],
"fontSize": 15
}
},
{
"type": "value",
"name": "",
"alignTicks": true,
"axisLabel": {
"fontSize": 16
},
"position": "right",
"nameLocation": "end",
"nameTextStyle": {
"padding": [
-30,
0,
0,
0
],
"fontSize": 15
}
}
],
"series": [
{
"name": "EGJJ3-1温度",
"isSectionProgress": false,
"type": "line",
"symbol": "circle",
"symbolSize": 10,
"itemStyle": {
"borderColor": "currentColor",
"borderWidth": 1
},
"lineStyle": {
"smooth": false,
"shadowColor": "white",
"shadowBlur": 10
},
"data": [
[
"2025-06-30 16:02:53",
21.5,
"【人工录入】",
"1916676405056999424",
"EGJJ3-1",
1751270573000
]
]
},
{
"name": "EGJJ1-2温度",
"isSectionProgress": false,
"type": "line",
"symbol": "circle",
"symbolSize": 10,
"itemStyle": {
"borderColor": "currentColor",
"borderWidth": 1
},
"lineStyle": {
"smooth": false,
"shadowColor": "white",
"shadowBlur": 10
},
"data": [
[
"2025-07-01 09:21:40",
21.5,
"【人工录入】",
"1916676404826312704",
"EGJJ1-2",
1751332900000
]
]
},
{
"name": "EGJJ5-2温度",
"isSectionProgress": false,
"type": "line",
"symbol": "circle",
"symbolSize": 10,
"itemStyle": {
"borderColor": "currentColor",
"borderWidth": 1
},
"lineStyle": {
"smooth": false,
"shadowColor": "white",
"shadowBlur": 10
},
"data": [
[
"2025-07-02 10:45:05",
21,
"【人工录入】",
"1916676405434486784",
"EGJJ5-2",
1751424305000
]
]
},
{
"name": "EGJJ2-2温度",
"isSectionProgress": false,
"type": "line",
"symbol": "circle",
"symbolSize": 10,
"itemStyle": {
"borderColor": "currentColor",
"borderWidth": 1
},
"lineStyle": {
"smooth": false,
"shadowColor": "white",
"shadowBlur": 10
},
"data": [
[
"2025-07-22 13:52:25",
25,
"【人工录入】",
"1916676404981501952",
"EGJJ2-2",
1753163545000
]
]
}
]
}

Current Behavior

datazoom偏移了原本位置

Expected Behavior

datazoom不应该发生偏移

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpendingWe 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