E

HierarchicalLayoutLayeringStrategy

Specifies different strategies for layering nodes in a HierarchicalLayout.

Members

No filters for this type

Constants

A layering strategy based on a breadth-first search (BFS).

All edges will span at most one layer in the resulting drawing. Edges between nodes that belong to the same layer are possible.

The nodes that will be placed in the first layer can be defined with bfsLayerAssignerCoreNodes. If there are no nodes defined, then nodes that have no incoming edges are placed in the first layer.

static

Sample Graphs

ShownSetting: BFS layering

See Also

Developer's Guide
API
fromScratchLayeringStrategy
A layering strategy which derives the layers from the initial coordinates of the nodes.

It tries to find a layering that is similar to the one in the input graph. The layout algorithm may place nodes in the same layer, even though they are connected by an edge.

In a vertically oriented layout, nodes that overlap vertically are placed in the same layer. The same holds for a horizontally oriented layout in the case where the nodes overlap horizontally.

static

See Also

Developer's Guide
API
fromScratchLayeringStrategy
A layering strategy which applies a fast heuristic that improves the layering done by HIERARCHICAL_TOPMOST by shifting some nodes down.
The quality of the result is usually worse than the one produced by HIERARCHICAL_TIGHT_TREE.
static

Sample Graphs

ShownSetting: Downshift hierarchical layering

See Also

Developer's Guide
API
fromScratchLayeringStrategy
A layering strategy which places each node in the optimal layer to minimize the layer distances.
The layer distance of an edge is the absolute difference between the layer numbers of its source and target node. The layer assignment will minimize the overall sum of the layer distances of all edges in the layout.
static

Sample Graphs

ShownSetting: Optimal hierarchical layering

See Also

Developer's Guide
API
fromScratchLayeringStrategy
A layering strategy which applies a heuristic to approximate the optimal layering.
The quality of the result may not be as good as with optimal layering but it is usually achieved faster.
static

Sample Graphs

ShownSetting: Tight tree layering

See Also

Developer's Guide
API
fromScratchLayeringStrategy
A layering strategy which places each node in the highest possible layer without passing its predecessor in the topological order of nodes.
All nodes with indegree zero will be assigned to the topmost layer of the layout. The number of separate layers will be as small as possible.
static

Sample Graphs

ShownSetting: Topmost hierarchical layering

See Also

Developer's Guide
API
fromScratchLayeringStrategy
A placeholder layering strategy which describes a strategy that is not part of the default strategies.
A layering strategy which uses a layer assignment specified by the user.

The nodes' layer assignment must be defined with layerIndicesResult.

This layering strategy allows edges whose source and target share a layer.

static

See Also

Developer's Guide
API
fromScratchLayeringStrategy

Static Methods

Converts the given argument to an enum constant of this enum type.
Most notably, this method can convert an enum constant's name into the enum constant itself.
static

Parameters

value: HierarchicalLayoutLayeringStrategy
The value to convert to an enum constant.

Return Value

HierarchicalLayoutLayeringStrategy
The enum constant that corresponds to the given argument.
Returns the name of the given enum constant.
static

Parameters

value: HierarchicalLayoutLayeringStrategy
The numeric value of an enum constant.

Return Value

string
The name of the enum constant.

Throws

Exception ({ name: 'Error' })
If this type is a flags enums, and the provided value doesn't correspond to a single enum constant, or if this enum type contains no constant of the given numeric value.