apache / echarts

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

[Feature] Using Graph type and Force layout provide a way to stop auto layout #19493

Open gkorland opened 8 months ago

gkorland commented 8 months ago

What problem does this feature solve?

When using type graph with layout force it provides a draggable option, but this option is pretty useless since whenever a node is dragged it immediately jumps back to the original place. Expected behavior, to let the user drag and "reorder" the layout.

What does the proposed API look like?

Extend the force configuration with "maxTime" that will stop auto layout after this time. Will also be very helpful to stop very long initial layout in large graphs.

helgasoft commented 8 months ago

related to #16682 #19230 Agree that draggable for layout force does not make sense. Probably a documentation bug, should be for layout 'none' only.

gkorland commented 8 months ago

I think it should be in force mode too, but only after it stabilize

cuberinooo commented 6 months ago

Is there are way to use this with force ? This would be a big benefit for us. Also we use force without animation. So we see the stabilized view immediately. When I allow "draggable" and try to drag a node the whole graph recalculates its position. I think the problem is that force does not stick with the init values. It just recalculates the positions everytime.