Search
TreeMapLayout Class
Remarks See Also
 





Performs tree-map layout on a graph.

Namespace: MindFusion.Graphs
Package: TreeMapLayout.js

 Syntax

JavaScript  Copy Code

// class
TreeMapLayout.prototype = {}

 Remarks

Tree maps represent hierarchies by nesting child nodes within their parents, where the areas of leaf nodes are proportional to their Weight values. Unlike other layout algorithms, TreeMapLayout expects hierarchies to be defined via grouping or containment (see attachTo method and ContainerNode class), and will ignore any links in the diagram.

The diagram area covered by the topmost nodes in a hierarchy is specified via the layoutArea property. By default, the layout tries to keep the ratio of node sides as close as possible to one. However this could make it hard to distinguish separate levels of the hierarchy. To alleviate that, set squarify to false, and child nodes will be arranged either as a row or a column inside their parent node, alternating directions for each level. The drawback is that when weight ratios differ greatly or nodes contain many children, some nodes could end up with very narrow rectangles.

The padding size between parent nodes and their outermost children is specified via the containerPadding property. The padding size between child nodes is specified via padding.

 Inheritance Hierarchy

MindFusion.Graphs.Layout
    MindFusion.Graphs.TreeMapLayout

 See Also