Hello,
I'm trying to develop a view of a hierarchical tree in which the weight of each node is the actual number of children it has. A leaf node has weight 1.
I want to arrange these items in a way they can be browsed going deeper into the tree by showing the root categories (with no parent) at the beginning. Clicking on a node makes the view repaint iself to show just children of that node.
The tricky part is that the size in pixel of a node should be proportional to its weight compared to adjacents nodes. According to wikipedia this is called treemapping and what I need is a tiling algorithm, I was trying to figure out by myself but it seems more complex that I expected..
To give you an example there is a program for Mac Os X called GrandPerspective that shows folder sizes of your HD:
I want to arrange nodes in a way like this! (of course size is proportional to folder size)
Any suggestions?
Thanks