graph 'draggable:true' with legend problem
- Dominant language
- TypeScript
- Stars
- 67.3k
- Forks
- 19.8k
- Avg merge
- 11d 14h
- Merged PRs (30d)
- 8
Description
### Version
5.5.1
### Link to Minimal Reproduction
[Example](https://echarts.apache.org/examples/en/editor.html?c=graph-force&code=LYTwwgFghgTgLgOgM4QPYHcAyqoBMCWAdgOYAUAlANwBQAJAsQKZykBKA8uwCoD6ACgEEuACQAEAalEByAPS4ocKDKhIkzOQqUAbRkgC0wfGphQARjqQIAVklSEpAGlEAzAK6EAxnHx3RpYiYADhDkogDe1KKioJCwiBD4uIzYeERkVJGiAVDBCISoSZbOqDAAolAeEKRunt6-pPlJoRFRUY2MyCDApqhaAMr4AF6MogC8ogCMEzRRAL4ZmaiBdYRj4ZlRphUA1gGo7rhgvSUAXFLmO46iG6LecDon662tcIwAHnCPUpi6ogCyRkYJnMukcNyiSFcpleHy-ABFGM4oK4tHBRFooCB9nAwc8onAll8enACcBcXidM5PtIYPhiBAcTdZg4bgTet5Ao8wsybjomIRcI8ANrgp54qIyGSiNQ6LyMXB_AqML5INI6cni-SKR7ZXIeBSMYglfC6BDAHLVdxeHyrUhQZqi54wZiuGCrKB5KDARgzcWieai2Y3AC6LOexhNSGFopafsIXuV0h-SH-gOBFg1eLgIECiakuogmeekoxWNc1KkxRgHkYRdakqrNa5omdgRRqrsjwmAAZu_6w37S9ivvlCLWB5qTMRiGYHrcYK5GBO8VqoDqghA8kqkMvnloiNso1kNwh94RD7vWvrXkbabp1zlN9fDcbdJeojAcMBHnAF0vHeiZiMFoXIAVEgSoKqKxfLS9KMn6_qBiGmSzL6MTQPAyDMOwyw2qQSwrBk8yUEAA)
### 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
```markdown
- OS: win 10
- Browser: Chrome
- Framework: none
```
### Any additional comments?
The documentation for [draggable](https://echarts.apache.org/en/option.html#series-graph.draggable) says:
_"Note that this option is only available when using [force-directed layout](https://echarts.apache.org/en/option.html#series-graph.force) before v5.4.1."_
But _draggable_ works for _layout:'none'_ too and makes sense **only** in this context.
Related to #19493.
Contributor guide
Assessment
This issue has not been assessed yet.