number of edges
get all edges as { v, w } descriptors
create a new graph containing only nodes that pass the filter
get graph configuration (includes width/height after layout)
check if an edge exists
check if a node exists
get incoming edge descriptors, optionally filtered to edges from w
Optionalw: stringalways false — compound graphs are not supported
always true — dagre graphs are directed
true if the graph has multiple edges between the same pair of nodes
get all neighbor node ids (predecessors and successors, deduplicated)
number of nodes
get all edge descriptors incident to v, optionally filtered to edges with w
Optionalw: stringget all node ids
get outgoing edge descriptors, optionally filtered to edges to w
Optionalw: stringget predecessor node ids
remove an edge
remove a node and all its edges
set default edge label factory (accepted for compatibility, not used)
set default node label factory, used when setNode is called without a label
add an edge (label is accepted for dagre compatibility but not used)
Optional_label: Record<string, unknown>add or update a node
Optionallabel: { height?: number; width?: number }add or update multiple nodes
Optionallabel: { height?: number; width?: number }add edges between consecutive pairs of nodes
get sink node ids (no children)
get source node ids (no parents)
get successor node ids
dagre-compatible mutable graph backed by d3-dag
Accessed as
dagre.graphlib.Graph. Use with dagre.layout.Example