echarts
echarts copied to clipboard
[Bug] 版本大于等于5.3.0在某些数据情况下,图表右侧会出现巨大的空白(可在官网实例的代码编辑器复现)
Version
5.3.0 or upper
Link to Minimal Reproduction
No response
Steps to Reproduce
option = {
"color": [
"#5470C6",
"#91CC75",
"#EE6666",
"#FFD700",
"#008000"
],
"tooltip": {
"trigger": "axis",
"axisPointer": {
"type": "cross"
}
},
"legend": {
"data": [
"aaa",
"bbb",
"ccc",
"ddd",
"eee"
]
},
"xAxis": [
{
"type": "category",
"axisTick": {
"alignWithLabel": true
},
"data": [
"2022-01-01",
"2022-01-02",
"2022-01-03",
"2022-01-04",
"2022-01-05",
"2022-01-06",
"2022-01-07",
"2022-01-08",
"2022-01-09",
"2022-01-10",
"2022-01-11",
"2022-01-12",
"2022-01-13",
"2022-01-14",
"2022-01-15",
"2022-01-16",
"2022-01-17",
"2022-01-18",
"2022-01-19",
"2022-01-20",
"2022-01-21",
"2022-01-22",
"2022-01-23",
"2022-01-24",
"2022-01-25",
"2022-01-26",
"2022-01-27",
"2022-01-28",
"2022-01-29",
"2022-01-30",
"2022-01-31",
"2022-02-01",
"2022-02-02",
"2022-02-03",
"2022-02-04",
"2022-02-05",
"2022-02-06",
"2022-02-07",
"2022-02-08",
"2022-02-09",
"2022-02-10",
"2022-02-11",
"2022-02-12",
"2022-02-13",
"2022-02-14",
"2022-02-15",
"2022-02-16",
"2022-02-17",
"2022-02-18",
"2022-02-19",
"2022-02-20",
"2022-02-21",
"2022-02-22",
"2022-02-23",
"2022-02-24",
"2022-02-25",
"2022-02-26",
"2022-02-27",
"2022-02-28",
"2022-03-01",
"2022-03-02",
"2022-03-03",
"2022-03-04",
"2022-03-05",
"2022-03-06",
"2022-03-07",
"2022-03-08",
"2022-03-09",
"2022-03-10",
"2022-03-11",
"2022-03-12",
"2022-03-13",
"2022-03-14",
"2022-03-15",
"2022-03-16",
"2022-03-17",
"2022-03-18",
"2022-03-19",
"2022-03-20",
"2022-03-21",
"2022-03-22",
"2022-03-23",
"2022-03-24",
"2022-03-25",
"2022-03-26",
"2022-03-27",
"2022-03-28",
"2022-03-29",
"2022-03-30",
"2022-03-31",
"2022-04-01",
"2022-04-02",
"2022-04-03",
"2022-04-04",
"2022-04-05",
"2022-04-06",
"2022-04-07",
"2022-04-08",
"2022-04-09",
"2022-04-10",
"2022-04-11",
"2022-04-12",
"2022-04-13",
"2022-04-14",
"2022-04-15",
"2022-04-16",
"2022-04-17",
"2022-04-18",
"2022-04-19",
"2022-04-20",
"2022-04-21",
"2022-04-22",
"2022-04-23",
"2022-04-24",
"2022-04-25",
"2022-04-26",
"2022-04-27",
"2022-04-28",
"2022-04-29",
"2022-04-30",
"2022-05-01",
"2022-05-02",
"2022-05-03",
"2022-05-04",
"2022-05-05",
"2022-05-06",
"2022-05-07",
"2022-05-08",
"2022-05-09",
"2022-05-10",
"2022-05-11",
"2022-05-12",
"2022-05-13",
"2022-05-14",
"2022-05-15",
"2022-05-16",
"2022-05-17",
"2022-05-18",
"2022-05-19",
"2022-05-20",
"2022-05-21",
"2022-05-22",
"2022-05-23",
"2022-05-24",
"2022-05-25",
"2022-05-26",
"2022-05-27",
"2022-05-28",
"2022-05-29",
"2022-05-30",
"2022-05-31",
"2022-06-01",
"2022-06-02",
"2022-06-03",
"2022-06-04",
"2022-06-05",
"2022-06-06",
"2022-06-07",
"2022-06-08",
"2022-06-09",
"2022-06-10",
"2022-06-11",
"2022-06-12",
"2022-06-13",
"2022-06-14",
"2022-06-15",
"2022-06-16",
"2022-06-17",
"2022-06-18",
"2022-06-19",
"2022-06-20",
"2022-06-21",
"2022-06-22",
"2022-06-23",
"2022-06-24",
"2022-06-25",
"2022-06-26",
"2022-06-27",
"2022-06-28",
"2022-06-29",
"2022-06-30",
"2022-07-01",
"2022-07-02",
"2022-07-03",
"2022-07-04",
"2022-07-05",
"2022-07-06",
"2022-07-07",
"2022-07-08",
"2022-07-09",
"2022-07-10",
"2022-07-11",
"2022-07-12",
"2022-07-13",
"2022-07-14",
"2022-07-15",
"2022-07-16",
"2022-07-17",
"2022-07-18",
"2022-07-19",
"2022-07-20",
"2022-07-21",
"2022-07-22",
"2022-07-23",
"2022-07-24",
"2022-07-25",
"2022-07-30",
"2022-07-31",
"2022-08-01",
"2022-08-02",
"2022-08-03",
"2022-08-05",
"2022-08-07",
"2022-08-09",
"2022-08-10",
"2022-08-13",
"2022-08-15",
"2022-08-16",
"2022-08-17",
"2022-08-20",
"2022-08-21",
"2022-08-22",
"2022-08-23",
"2022-08-24",
"2022-08-25",
"2022-08-27",
"2022-08-29",
"2022-08-30",
"2022-09-01"
],
"axisLabel": {
"textStyle": {
"fontSize": "10"
}
}
}
],
"grid": {
"left": "1%",
"right": "1%",
"bottom": "3%",
"containLabel": true
},
"yAxis": [
{
"type": "value",
"name": "y1",
"position": "left",
"alignTicks": true,
"axisLine": {
"show": true,
"lineStyle": {
"color": "#91CC75"
}
}
},
{
"type": "value",
"name": "y2",
"position": "right",
"alignTicks": true,
"axisLine": {
"show": true,
"lineStyle": {
"color": "#EE6666"
}
}
}
],
"series": [
{
"data": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"name": "ccc",
"type": "bar",
"stack": "effect"
},
{
"data": [
62,
62,
62,
52,
55,
60,
60,
62,
62,
54,
56,
56,
60,
66,
75,
73,
71,
72,
73,
76,
65,
75,
75,
71,
71,
71,
64,
75,
76,
78,
78,
78,
78,
78,
78,
78,
78,
77,
76,
76,
79,
80,
82,
82,
71,
76,
78,
75,
79,
82,
82,
76,
77,
77,
77,
80,
87,
87,
84,
85,
82,
86,
96,
99,
99,
93,
95,
94,
93,
98,
104,
104,
103,
105,
98,
101,
109,
113,
113,
109,
111,
107,
108,
106,
118,
118,
113,
109,
114,
107,
112,
116,
119,
119,
119,
114,
121,
123,
130,
130,
123,
130,
130,
134,
138,
142,
142,
141,
144,
138,
143,
154,
158,
153,
151,
156,
156,
112,
76,
79,
79,
79,
79,
79,
66,
72,
69,
74,
51,
48,
53,
56,
57,
59,
59,
54,
45,
49,
54,
53,
61,
61,
60,
57,
57,
50,
62,
69,
69,
66,
57,
65,
59,
68,
68,
68,
64,
65,
73,
71,
77,
81,
81,
63,
63,
62,
62,
68,
71,
71,
63,
67,
69,
64,
66,
73,
73,
67,
68,
67,
63,
67,
73,
73,
66,
70,
69,
67,
62,
66,
66,
63,
71,
69,
69,
77,
82,
82,
68,
75,
79,
85,
89,
92,
90,
96,
107,
107,
110,
101,
101,
103,
103,
98,
97,
105,
107,
110,
114,
116,
116,
103,
108,
113,
111,
114,
122,
120,
119
],
"name": "ddd",
"type": "bar",
"stack": "effect"
},
{
"yAxisIndex": 1,
"data": [
0.14,
0.139,
0.153,
0.151,
0.151,
0.151,
0.148,
0.14,
0.138,
0.136,
0.138,
0.14,
0.145,
0.127,
0.129,
0.145,
0.145,
0.15,
0.153,
0.151,
0.135,
0.132,
0.132,
0.128,
0.129,
0.13,
0.132,
0.129,
0.128,
0.125,
0.126,
0.126,
0.126,
0.126,
0.125,
0.125,
0.124,
0.121,
0.121,
0.121,
0.115,
0.116,
0.111,
0.104,
0.109,
0.11,
0.113,
0.115,
0.11,
0.105,
0.102,
0.113,
0.108,
0.114,
0.117,
0.115,
0.113,
0.107,
0.106,
0.108,
0.115,
0.117,
0.122,
0.122,
0.122,
0.127,
0.127,
0.132,
0.129,
0.131,
0.131,
0.135,
0.134,
0.131,
0.136,
0.164,
0.162,
0.159,
0.163,
0.166,
0.167,
0.172,
0.17,
0.181,
0.176,
0.175,
0.174,
0.176,
0.179,
0.176,
0.176,
0.175,
0.174,
0.17,
0.17,
0.169,
0.167,
0.173,
0.17,
0.186,
0.183,
0.186,
0.172,
0.178,
0.188,
0.188,
0.181,
0.179,
0.182,
0.182,
0.181,
0.186,
0.182,
0.193,
0.19,
0.196,
0.2,
0.181,
0.2,
0.198,
0.205,
0.204,
0.203,
0.203,
0.173,
0.167,
0.169,
0.169,
0.09,
0.09,
0.091,
0.09,
0.091,
0.092,
0.089,
0.085,
0.088,
0.089,
0.089,
0.09,
0.088,
0.088,
0.086,
0.087,
0.086,
0.085,
0.085,
0.083,
0.079,
0.066,
0.072,
0.073,
0.078,
0.078,
0.078,
0.079,
0.081,
0.082,
0.083,
0.15,
0.153,
0.153,
0.154,
0.15,
0.151,
0.144,
0.156,
0.155,
0.156,
0.158,
0.154,
0.156,
0.159,
0.166,
0.159,
0.158,
0.169,
0.166,
0.167,
0.168,
0.17,
0.165,
0.164,
0.157,
0.155,
0.158,
0.16,
0.163,
0.168,
0.166,
0.177,
0.178,
0.183,
0.186,
0.193,
0.199,
0.218,
0.223,
0.231,
0.233,
0.238,
0.248,
0.251,
0.248,
0.243,
0.266,
0.266,
0.266,
0.28,
0.289,
0.28,
0.281,
0.283,
0.286,
0.251,
0.264,
0.265,
0.273,
0.274,
0.277,
0.277,
0.28,
0.281,
0.26,
0.261,
0.259,
0.253,
0.257,
0.23
],
"name": "eee",
"type": "line",
"connectNulls": "true"
}
]
};
Current Behavior
版本大于等于5.3.0图表右侧有巨大空白

Expected Behavior
版本5.2.2,一切正常

Environment
- OS:macOS Monterey
- Browser:Chrome 104.0.5112.101
- Framework:https://echarts.apache.org/examples/zh/editor.html
Any additional comments?
No response
@bryanzhou It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
TRANSLATED
TITLE
[Bug] When the version is greater than or equal to 5.3.0, in some data cases, a huge blank will appear on the right side of the chart (this can be reproduced in the code editor of the official website instance)
It seems the new feature alignTicks introduced in v5.3.0 causes this unexpected behavior.
我也遇到了, 最新版本仍有此问题, 怎么解决的啊?求助
我也遇到了, 最新版本仍有此问题, 怎么解决的啊?求助
不知道有没有修复,反正我当时只能降低版本到522解决
same data, different version, different result. 1、https://codesandbox.io/p/sandbox/3qp5fc 2、https://codesandbox.io/p/sandbox/8kwyvl