From 79dc2cb62bbff5b87d80cff38dd98597d5d64e4f Mon Sep 17 00:00:00 2001 From: yangdx Date: Sat, 22 Mar 2025 14:52:43 +0800 Subject: [PATCH] Adjust force-directed layout parameters for better stability. - Reduced repulsion force to 0.01 - Minimized node oscillation - Improved convergence behavior --- lightrag_webui/src/components/graph/LayoutsControl.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightrag_webui/src/components/graph/LayoutsControl.tsx b/lightrag_webui/src/components/graph/LayoutsControl.tsx index 2f0cc50a..a211656b 100644 --- a/lightrag_webui/src/components/graph/LayoutsControl.tsx +++ b/lightrag_webui/src/components/graph/LayoutsControl.tsx @@ -218,7 +218,7 @@ const LayoutsControl = () => { maxIterations: maxIterations, settings: { attraction: 0.0003, // Lower attraction force to reduce oscillation - repulsion: 0.05, // Lower repulsion force to reduce oscillation + repulsion: 0.01, // Lower repulsion force to reduce oscillation gravity: 0.01, // Increase gravity to make nodes converge to center faster inertia: 0.4, // Lower inertia to add damping effect maxMove: 100 // Limit maximum movement per step to prevent large jumps