grantshandy / fdg

A Force Directed Graph Drawing Library
https://grantshandy.github.io/fdg
MIT License
192 stars 16 forks source link

Specifying gravity #18

Open shivam-880 opened 8 months ago

shivam-880 commented 8 months ago

Is there a way we can specify gravity for layouts?

grantshandy commented 8 months ago

Sure! you can define a Gravity Force which applies the gravity equation on each node with a center point. I'll try to make one rn and put it in main.