Explanation of D3 clickable "pack" layout.
click to see official example. "elements" in this article means HTML elements. In treemap layou, we are using rectangular as basic units while in pack layout, we are using circles as basic units.
Treemap nodes:
- parent - the parent node, or null for the root.
- children - the array of child nodes, or null for leaf nodes.
- value - the node value, as returned by the value accessor.
- depth - the depth of the node, starting at 0 for the root.
- x - the minimum x-coordinate of the node position.
- y - the minimum y-coordinate of the node position.
- dx - the x-extent of the node position.
- dy - the y-extent of the node position.
For each rectangular, top left point is (x,y) and the width is "dx" and the height is "dy". "value" is the size of rect.
No comments:
Post a Comment