d3-dag
    Preparing search index...

    Interface LayeringTopological<Ops>

    a layering that assigns every node a distinct layer

    This combined with topological coordinate assignment can be thought of as an alternative to zherebko. The latter generally produces more pleasing layouts, but both are options. This layering is very fast, but it may make other steps take longer due to the many created dummy nodes.

    Create with layeringTopological.

    interface LayeringTopological<
        Ops extends LayeringTopologicalOps = LayeringTopologicalOps,
    > {
        rank<NewRank extends Rank>(
            newRank: NewRank,
        ): LayeringTopological<U<Ops, "rank", NewRank>>;
        rank(): Ops["rank"];
        <N extends unknown, L extends unknown>(
            graph: Graph<N, L>,
            sep: Separation<N, L>,
        ): number;
    }

    Type Parameters

    Hierarchy (View Summary)

    • layer a graph

      After calling this, every node should have a y coordinate that satisfies sep.

      Type Parameters

      • N extends unknown
      • L extends unknown

      Parameters

      • graph: Graph<N, L>

        the graph to layer

      • sep: Separation<N, L>

        the minimum separation between nodes

      Returns number

      height - the height after layering

    Index

    Methods

    Methods