d3-dag
    Preparing search index...

    Type Alias Rank<NodeDatum, LinkDatum>

    Rank: (node: GraphNode<NodeDatum, LinkDatum>) => number | undefined

    a way to enforce specific rankings of nodes

    A rank accessor assigns a numeric rank to some nodes. In general, nodes with a lower rank come before nodes with a higher rank. Layering operators that take a rank accessor additionally guarantee that nodes with the same rank will share the same layer (if possible).

    Type Parameters

    • in NodeDatum = never
    • in LinkDatum = never

    Type Declaration

    This example demonstrates passing through a rank value that might exist on a node.

    function memberRank({ data }: GraphNode<{ rank?: number }>): number | undefined {
    return data.rank;
    }