Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 条形图 图表标线 文本加载时会闪烁 #20834

Open
HQQT opened this issue Mar 18, 2025 · 2 comments
Open

[Bug] 条形图 图表标线 文本加载时会闪烁 #20834

HQQT opened this issue Mar 18, 2025 · 2 comments
Labels
bug pending We are not sure about whether this is a bug/new feature.

Comments

@HQQT
Copy link

HQQT commented Mar 18, 2025

Version

5.4.1

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=dataset-encode0

Steps to Reproduce

option = {

"tooltip": {
"trigger": "axis",
"backgroundColor": "rgba(0,0,0,0.5)",
"borderColor": "rgba(0,0,0,0.5)",
"textStyle": {
"color": "#fff"
},
"appendToBody": true
},
"grid": {
"left": "1%",
"right": "5%",
"top": "35px",
"bottom": "15%",
"containLabel": true
},
"legend": {
"orient": "horizontal",
"bottom": "bottom",
"left": "center",
"show": true,
"type": "scroll",
"pageIconColor": "#2f4554",
"pageIconInactiveColor": "#aaa",
"pageTextStyle": {
"color": "#a3a4aa"
},
"top": "bottom",
"textStyle": {
"color": "#a3a4aa"
},
"itemStyle": {
"color": "rgb(142, 114, 192)"
}
},
"xAxis": {
"type": "value",
"show": true,
"axisLabel": {
"show": true,
"color": "#a3a4aa",
"rotate": 0,
"margin": 16,
"interval": "auto"
},
"data": [],
"position": "top",
"axisLine": {
"lineStyle": {
"color": "#a3a4aa"
},
"show": true
},
"axisTick": {
"lineStyle": {
"color": "#a3a4aa"
}
},
"name": "",
"max": null,
"min": null,
"unit": "custom",
"nameTextStyle": {
"padding": [
0,
0,
0,
-10
]
}
},
"yAxis": [
{
"show": true,
"axisLabel": {
"show": true,
"color": "#a3a4aa",
"interval": "auto",
"rotate": 0
},
"data": [
"B",
"A",
"C",
"D"
],
"position": "top",
"axisLine": {
"lineStyle": {
"color": "#a3a4aa"
}
},
"splitLine": {
"lineStyle": {
"color": "#e1e7f1"
}
},
"axisTick": {
"lineStyle": {
"color": "#a3a4aa"
}
}
}
],
"series": [
{
"name": "年龄",
"type": "bar",
"yAxisIndex": 0,
"data": [
{
"value": 198,
"label": {
"position": "right"
},
"itemStyle": {
"borderRadius": 0
}
},
{
"value": 2423,
"label": {
"position": "right"
},
"itemStyle": {
"borderRadius": 0
}
},
{
"value": 55,
"label": {
"position": "right"
},
"itemStyle": {
"borderRadius": 0
}
},
{
"value": 45,
"label": {
"position": "right"
},
"itemStyle": {
"borderRadius": 0
}
}
],
"stack": "",
"label": {
"show": false,
"color": "#a3a4aa",
"position": "right"
},
"barMinWidth": 5,
"barMaxWidth": 80,
"markLine": {
"silent": true,
"data": [
{
"type": "average",
"name": "1",
"lineStyle": {
"color": "#306fff"
}
}
],
"label": {
"position": "insideEndTop",
"color": "#a3a4aa"
}
},
"itemStyle": {}
}
],
"visualMap": null

};

Current Behavior

加载重绘时,条形图的图表标线标签会闪动
如果 label.position: 'end',时正常的,设置为insideEndTop、middle等都会闪烁

Expected Behavior

可以帮助解决一下吗?谢谢大家

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@HQQT HQQT added the bug label Mar 18, 2025
@echarts-bot echarts-bot bot added the pending We are not sure about whether this is a bug/new feature. label Mar 18, 2025
Copy link

echarts-bot bot commented Mar 18, 2025

@HQQT 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] bar chart reticle text flashes when loaded

@helgasoft
Copy link

helgasoft commented Mar 18, 2025

There are difficulties understanding the issue:

  • version 5.4.1 - there is no easy way to test older versions anymore, please test with latest version
  • Minimal Reproduction is an official example, is there a problem with it ?
  • please specify markLine.label.position instead of label.position, there are many labels in a chart
  • Englisg translation says "flicker" and "flash" - no such effects are visible. There is markLine animation that you can disable with animation:false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

2 participants