d3-dag
    Preparing search index...

    Interface DecrossOpt

    a Decross that minimizes the number of crossings

    This method brute forces an NP-Complete problem, and as such may run for an exceedingly long time on large graphs. As a result, any graph that is probably too large will throw an error instead of running. Use with care.

    Create with decrossOpt.

    interface DecrossOpt {
        check(val: OptChecking): DecrossOpt;
        check(): OptChecking;
        dist(val: boolean): DecrossOpt;
        dist(): boolean;
        (layers: SugiNode<unknown, unknown>[][]): void;
    }

    Hierarchy (View Summary)

    • Decross<unknown, unknown>
      • DecrossOpt
    Index

    Methods

    Methods

    • set whether to also minimize distance between nodes that share an ancestor

      This setting adds more variables and constraints, and so will make the decrossing step take longer, but will likely produce a better layout as nodes that share common parents or children will be put closer together if it doesn't affect the number of crossings. It is especially usefuly for ancestry layoutss where nodes that share a child will inherently be put closer together even if it doesn't reduce the number of crossings.

      (default: false)

      Parameters

      • val: boolean

      Returns DecrossOpt

    • get whether the current layout minimized distance

      Returns boolean