I'm currently working a javascript project about user interface related to status of servers. I have a main node, which all nodes connected to, and some nodes. Number of nodes can be any, say between 5 and 50. I want them auto-fitted and the main node should be placed in the middle. Please click the link.
As you see in the figure, all nodes connected to main node, plus their sizes and positions are arranged to fit in the view.
Is there any library, example or a code snipplet that I can use?
- or -
Any suggestions about how I can construct this?
Edit: I'm simply asking, is there any algorithm that I can fit some number of objects into the screen?
PS: sorry about tags, I couldn't decide what to put.