Skip to content

[Bug] 使用图例隐藏 series 图表后,更新 series 图表 symbolSize 配置,图表自动重新渲染后没有应用到最新的 symbolSize 值 #20898

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

Open
TimGin117 opened this issue Apr 7, 2025 · 4 comments
Labels
bug pending We are not sure about whether this is a bug/new feature.

Comments

@TimGin117
Copy link

Version

5.6.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=line-stack&lang=js

Steps to Reproduce

  1. 点击图例配置,隐藏 email 图表
  2. 更新 option.series[0].symbolSize 值,如 5 -> 0
  3. 图表更新 option 触发重新渲染,隐藏的 email 图表重新展示,但是 symbolSize 配置仍为 5
  4. 手动点击运行,再次重新渲染图表才能正确展示最新设置的 symbolSize
    Image

Current Behavior

隐藏的图表自动重新渲染后没有应用最新的 series 配置

Expected Behavior

预期隐藏图表后,更新 option 能应用最新的 series 配置

Environment

- OS: macOS
- Browser: Chrome
- Framework: react

Any additional comments?

No response

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

echarts-bot bot commented Apr 7, 2025

@TimGin117 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] After hiding a series chart with a legend, the symbolSize configuration of the series chart is updated, and the chart is automatically re-rendered without being applied to the latest symbolSize value

BODY

Version

5.6.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=line-stack&lang=js

Steps to Reproduce

  1. Click on the legend configuration to hide the email chart
  2. Update option.series[0].symbolSize value, such as 5 -> 0
  3. Chart update option triggers re-rendering, and the hidden email chart is re-presented, but the symbolSize configuration is still 5
  4. Click Run manually and re-render the chart again to correctly display the latest symbolSize
    Image

Current Behavior

The hidden chart is automatically rerendered without the latest series configuration applied

Expected Behavior

After the chart is expected to be hidden, update option can apply the latest series configuration

Environment

- OS: macOS
- Browser: Chrome
- Framework: react

Any additional comments?

No response

@helgasoft
Copy link

This is Editor's behavior. There is no problem when using setOption - Demo.

@TimGin117
Copy link
Author

Image
@helgasoft it still has problem,when hidden the series and then setOption to change symbolSize,chart render is wrong

@helgasoft
Copy link

Oh, I understand the bug now. Everything is fine when the line legend is enabled.
But when the line legend item is disabled, setting line.symbolSize to zero(0) thru setOption does not work. It seems as if there is a hidden emphasis.symbolSize that changes instead of line.symbolSize. Demo

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