Multiple Diagrams per VSDX File

The VsdxIO class renders multiple diagrams into a single VSDX file by calling the addGraph method multiple times:

const graphComponents = [new GraphComponent(), new GraphComponent()]

const vsdxIO = VsdxIO.createDefault()

// render each diagram on its own page (addGraph creates a new page, if none is provided)
await vsdxIO.addGraph(graphComponents[0])
await vsdxIO.addGraph(graphComponents[1])

The Multi-Graph Demo (demos/multigraph) is a more complex example for adding multiple diagrams to a single VSDX file.