layout a graph with the grid layout
dimensions - the width and height of the final layout
Get the current gap size
set a custom Lane operator
The lane operator controls how nodes are assigned to horizontal lanes. This is the core piece of the layout. There are two builtin lane operators:
You can also supply any function that satisfies the Lane interface. See that documentation for more information about implementing your own lane assignment.
(default: laneGreedy)
get the current lane operator
Sets this grid layout's node size to the specified two-element array of numbers [ width, height ] and returns a new operator. These sizes are effectively the grid size, e.g. the spacing between adjacent lanes or rows in the grid.
(default: [1, 1]
)
Get the current node size
get the current rank operator
A simple grid based topological layout operator.
This layout algorithm constructs a topological representation of the dag meant for visualization. The nodes are topologically ordered and then nodes are put into lanes such that an edge can travel horizontally to the lane of a child node, and then down without intersecting to that child.
Create with grid.