apache / echarts

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

graph 'draggable:true' with legend problem #20518

Open helgasoft opened 1 week ago

helgasoft commented 1 week ago

Version

5.5.1

Link to Minimal Reproduction

Example

Steps to Reproduce

drag some nodes and select a category from legend

Current Behavior

After dragging some nodes and selecting a category from legend, all nodes are reset to their original positions, i.e. the manual repositioning is lost. I wouldn't call it a bug, but it isn't right behavior either. Why bother to rearrange a graph when a simple legend click will reset it?

Expected Behavior

Legend is about node visibility only and should not affect node positions.

Environment

- OS: win 10
- Browser: Chrome
- Framework: none

Any additional comments?

The documentation for draggable says: "Note that this option is only available when using force-directed layout before v5.4.1." But draggable works for layout:'none' too and makes sense only in this context. Related to #19493.