Implements a tree map layout algorithm.
Namespace: MindFusion.Diagramming.Layout
Assembly: MindFusion.Diagramming
C# Copy Code |
---|
public class TreeMapLayout : Layout |
Visual Basic Copy Code |
---|
Public Class TreeMapLayout |
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.
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
MindFusion.Diagramming.Layout.Layout
MindFusion.Diagramming.Layout.TreeMapLayout