apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.57k stars 19.61k forks source link

[Bug] Graph with 'layoutAnimation: false' and force-directed layout would have its nodes and links derailed. #18174

Open Mingeax opened 1 year ago

Mingeax commented 1 year ago

Version

5.4.1

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=graph-force

Steps to Reproduce

  1. set the example options with 'series: force: layoutAnimation: false';
  2. select some legends;
  3. use mouse zoom the graph;

Current Behavior

The nodes and links appear derailed. image

Expected Behavior

Links and nodes connect each other. image

Environment

- OS: win10
- Browser: firefox 107.0 (64 bits)
- Framework: iframe sandbox

Any additional comments?

No response

helgasoft commented 1 year ago

Yes, your observations are correct.
Zooming will separate nodes from links and create a mess. Clicking on a legend will fix it somewhat, but not 100%. Disabling force.layoutAnimation is not recommended.

jskogeby commented 1 year ago

I have the same issue. Any plans to address this in a future release? Suggestions for a workaround?