Hacker News new | past | comments | ask | show | jobs | submit login

Does anyone know why most graph libraries that I see of this type have nodes that seem to bounce all over the place? Is there a practical motivation for this? I would think a less animated version would be more usable.



The computation of the physics simulation (applying forces between nodes, ending once it finds a local minimum) is an intensive process. You could do it all at once but it would probably hang your page for a meaningful time. You could also reduce the framerate or only show the results at the first an final frames, but those also have user interface implications.


CGamesPlay and TuringTest are both right, the gravity and springs model allows us to neatly show the data. These calculations take time and for bigger systems one might have to wait tens of seconds for it to settle. For smaller systems it's perfectly feasible to do this before rendering. To make sure the user sees a result instantly and to promote the interactivity the movement is shown.

I'd like to add that vis allows you to store the positions and use these for the next time someone views the graph. That way it may take some time to settle initially but is loaded nearly instantly the next time you, or another user, views it!


Also, in graphs on random data, using strength on the strings between nodes to separate them is an automatic way to create a layout where all nodes can be seen.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: