Creates a new dot graph.
Optional
label: stringThe label of the graph.
Whether the graph is directed.
Whether the graph is strict. A strict graph may not have multiple edges between the same nodes: they are merged into a single edge.
The list of statements inside the graph.
Whether the graph is directed.
Optional
labelThe label of the graph
The list of statements inside the graph.
Whether the graph is marked with the strict keyword.
A strict graph may not have multiple edges between the same nodes: they are merged into a single edge.
Adds an edge to the graph.
The ID of the source node of the edge.
The ID of the target node of the edge.
Optional
attrs: Record<string, string>The list of attributes of the edge.
This graph, for chaining.
Adds a node to the graph.
The ID of the node.
Optional
attrs: Record<string, string>The list of attributes of the node.
This graph, for chaining.
Adds statements to the graph.
Rest
...statement: DotStatement[]The statements to add.
This graph, for chaining
A dot graph.
While it would be convenient for DotGraph to extend DotSubgraph, that would violate the Liskov Substitution Principle: you may not use a DotGraph wherever a DotSubgraph is expected.