Skip to main content

HierarchicalLayoutParameters

Parameters for the HierarchicalLayout

Extends

Properties

absoluteBacked?

optional absoluteBacked: boolean

Defaults to false. If true, then the layout will use any position values found in the data for a given vertex.

Inherited from

AbstractHierarchicalLayoutParameters.absoluteBacked


align?

optional align: HierarchicalLayoutAlignment

Optional, defaults to "center". Instructs the layout how to place child nodes with respect to their parent nodes. By default, a group of child nodes is centered on its parent. The layout also supports "start" and "end" for this value, which work in much the same way as "flex-start" and "flex-end" do in CSS: for a hierarchical layout with the root at the top of the tree and the child nodes underneath, a value of "start" for align would cause the first child of the root to be placed immediately under the root, with its first child immediately underneath, etc. The remainder of the content would fan out to the right. This option also works in conjunction with invert and orientation:"vertical"


getChildVertices?

optional getChildVertices: HierarchicalLayoutChildVerticesFunction<Vertex>

Optional function used to determine the edges to traverse to find children from some node

Param

Param

Inherited from

AbstractHierarchicalLayoutParameters.getChildVertices


getRootNode()?

optional getRootNode: (dataSource) => Vertex[]

Optional. A function that is given the data source instance as argument and is expected to return either a single node/group, or an array of nodes/groups, to use as the root(s) for the layout

Parameters

dataSource

DataSource

Returns

Vertex[]

Inherited from

AbstractHierarchicalLayoutParameters.getRootNode


height?

optional height: number

Optional fixed height for the layout.

Inherited from

AbstractHierarchicalLayoutParameters.height


ignoreLoops?

optional ignoreLoops: boolean

Defaults to true. If a loop is found during the layout it is usually ignored, unless this is set to true.

Inherited from

AbstractHierarchicalLayoutParameters.ignoreLoops


ignorePorts?

optional ignorePorts: boolean

Defaults to false, meaning that ports are taken into account when figuring the list of edges from some vertex. If you set this to true, ports will be ignored and the layout will only consider edges connected directly to each vertex.

Inherited from

AbstractHierarchicalLayoutParameters.ignorePorts


invert?

optional invert: boolean

Optional, defaults to false. If true, the layout will be inverted, ie. the root node will be at the bottom for horizontal layouts, and to the right for vertical layouts


locationFunction?

optional locationFunction: LocationFunction

Optional function that, given some vertex, can provide the x/y location of the vertex on the canvas

Inherited from

AbstractHierarchicalLayoutParameters.locationFunction


orientation?

optional orientation: HierarchicalLayoutOrientation

Optional, defaults to "vertical". Valid values are "vertical" and "horizontal".


padding?

optional padding: PointXY

Optional padding to put around the elements.

Inherited from

AbstractHierarchicalLayoutParameters.padding


rootNode?

optional rootNode: Vertex[]

Optional. Defines the nodes/groups to use as the root of the tree. These may be provided as an array of either a node/group id or a node/group object. If this parameter is not specified and multipleRoots is not false then the layout uses the result(s) of the getRootNode function; otherwise it uses the first node/group found in the dataset.

Inherited from

AbstractHierarchicalLayoutParameters.rootNode


spacing?

optional spacing: HierarchicalLayoutSpacing

Optional, defaults to "auto". Valid values are: "auto" (Spacing.auto) Spaces each node and its parent according to the size of the biggest node in the given node's level. "compress" (Spacing.compress) Uses a regular spacing between each node and its parent


width?

optional width: number

Optional fixed width for the layout.

Inherited from

AbstractHierarchicalLayoutParameters.width