yangdx commited on
Commit
9f586c2
·
1 Parent(s): 626a175

Adjust force-directed layout parameters for better stability

Browse files
lightrag_webui/src/components/graph/LayoutsControl.tsx CHANGED
@@ -218,8 +218,8 @@ const LayoutsControl = () => {
218
  maxIterations: maxIterations,
219
  settings: {
220
  attraction: 0.0003, // Lower attraction force to reduce oscillation
221
- repulsion: 0.01, // Lower repulsion force to reduce oscillation
222
- gravity: 0.01, // Increase gravity to make nodes converge to center faster
223
  inertia: 0.4, // Lower inertia to add damping effect
224
  maxMove: 100 // Limit maximum movement per step to prevent large jumps
225
  }
 
218
  maxIterations: maxIterations,
219
  settings: {
220
  attraction: 0.0003, // Lower attraction force to reduce oscillation
221
+ repulsion: 0.02, // Lower repulsion force to reduce oscillation
222
+ gravity: 0.02, // Increase gravity to make nodes converge to center faster
223
  inertia: 0.4, // Lower inertia to add damping effect
224
  maxMove: 100 // Limit maximum movement per step to prevent large jumps
225
  }