Skip to main content

Home > @jsplumbtoolkit/core > Vertex > addGraph

Vertex.addGraph() method#

Adds a sub-graph to this vertex. If you provide an existing Graph instance that does not have an id, one will be assigned.

Signature:

addGraph(g: string | Graph): Graph;

Parameters#

ParameterTypeDescription
gstring | Graph

Returns:

Graph

The Graph that was added.