documentationfor yFiles for HTML 2.6

TreeLayoutData

Specifies custom data for the TreeLayout.

Inheritance Hierarchy
LayoutData
TreeLayoutData

Examples

The following example shows how to create a new instance of TreeLayoutData and use it with an TreeLayout:

Creating an instance of TreeLayoutData
const layoutData = new TreeLayoutData()
layoutData.nodeHalos.constant = NodeHalo.create(15)
layoutData.treeRoot.item = rootNode

graph.applyLayout(new TreeLayout(), layoutData)

In many cases the complete initialization of TreeLayoutData can also be done in a single object initializer:

Using an object initializer for easy creation of TreeLayoutData
const layoutData = new TreeLayoutData({
  nodeHalos: NodeHalo.create(15),
  treeRoot: (node) => node === rootNode
})

graph.applyLayout(new TreeLayout(), layoutData)

Type Details

yfiles module
view-layout-bridge
yfiles-umd modules
view-layout-bridge
Legacy UMD name
yfiles.tree.TreeLayoutData

See Also

Constructors

Properties

Methods