documentationfor yFiles for HTML 2.6

AspectRatioTreeLayout

The AspectRatioTreeLayout arranges tree graphs in a compact fashion.

Inheritance Hierarchy
MultiStageLayout
AspectRatioTreeLayout
Implemented Interfaces

Remarks

Layout Style

This layout algorithm tries to generate compact tree layouts with a certain preferred aspect ratio.

Example layout with an aspect ratio of 0.5

Concept

The layout algorithm starts from the root and recursively assigns coordinates to all tree nodes. In this manner, leaf nodes will be placed first, while each parent node is placed centered above its child nodes.

Features

The aspect ratio of each subtree can be specified individually. A IDataProvider registered with SUBTREE_ASPECT_RATIO_DP_KEY returns the aspect ratio for each local root node.

A custom node can be defined as root of the tree using a IDataProvider registered with the graph with key SELECTED_ROOT_DP_KEY.

Default Values of Properties

aspectRatio1.41
bendDistance20
componentLayoutEnabledtrueThe stage that arranges connected graph components is activated.
hideGroupsStageEnabledtrueThe stage responsible for hiding group nodes is activated.
horizontalDistance10
parallelEdgeRouterEnabledtrueThe stage that routes parallel edges is activated.
rootPlacementCORNER
selfLoopRouterEnabledtrueThe stage that routes self-loops is activated.
subtreeArrangementHORIZONTAL
verticalDistance10

Type Details

yfiles module
layout-tree
yfiles-umd modules
layout-orthogonal-compact, layout-orthogonal, layout-tree, layout
Legacy UMD name
yfiles.tree.AspectRatioTreeLayout

See Also

Constructors

Properties

Methods

Fields

Constants