Skip to content

Interface: LayeredOptions ​

Properties ​

PropertyModifierTypeDescription
aspect?readonlynumberWidth over height the packing of disconnected parts aims for. Default 1.6.
clusterLabelHeight?readonlynumberRoom for the title along the top of a cluster's frame, above the padding. Default 18.
clusterPadding?readonlynumberSpace between a cluster's frame and its nodes. Default 12.
clusters?readonlybooleanKeep the nodes of a group together and return a frame per group. Default false.
componentsep?readonlynumberFree space between two disconnected parts of the graph. Default 40.
edgesep?readonlynumberFree space between two long links that pass a rank side by side. Default 12.
nodesep?readonlynumberFree space between two nodes of a rank. Default 30.
orderRounds?readonlynumberUpper bound on the crossing reduction sweeps (it stops earlier when they stop helping). Default 24.
rankdir?readonlyLayeredRankdirDirection the links point in. Default 'TB'.
ranker?readonlyLayeredRanker'network-simplex' (default) gives the shortest total link length, 'tight-tree' is its starting point (longest path, then every component pulled tight along a spanning tree) and 'longest-path' puts every node as early as its links allow.
ranksep?readonlynumberFree space between two ranks, measured between their tallest nodes. Default 50.
routing?readonlyLayeredRouting'spline' (default): smooth cubic Bézier chains; 'polyline': straight segments through the same points; 'orthogonal': axis-aligned segments with one bend between two ranks.

Released under the MIT License.