d3-dag
    Preparing search index...

    Type Alias Lane<NodeDatum, LinkDatum>

    Lane: (ordered: readonly GraphNode<NodeDatum, LinkDatum>[]) => void

    An operator for assigning nodes to a lane.

    Before calling this operator, all nodes will have their y set to their topological order. After, each node should also have an x set to its non-negative lane assignment.

    Type Parameters

    • in NodeDatum = never
    • in LinkDatum = never

    Type Declaration

    It's probably not necessary to implement your own lane operator as the defaults should cover most circumstances. To illustrate how you would though, the most trivial lane assignment just assigns each node to a unique lane:

    function trivialLane(ordered: readonly GraphNode[]): void {
    for (const [i, node] in ordered.entries()) {
    node.x = i;
    }
    }