How to have a node in a GoJS diagram call up another GoJS diagram

I’m sorry for using words to describe this.

So imagine a webpage that’s split down the middle so we have left vs right, instead of top vs bottom.

On the left we have a typical GoJS diagram like the FlowChart sample. Inside the lefthand side diagram, we have some nodes.

Depending on which node we select by double clicking, the right hand side will display a completely different GoJS diagram.

I am unsure how to display the right hand side diagram. Do I use an iframe?

Different nodes that are clicked on diagram 1 will show a different diagram for diagram 2.

Taking this question even further, if instead of 2 levels, what if I want to drill in up to 5 levels deep? How might this be done?

diagram 1-> diagram 2 → diagram 3 → diagram 4 → diagram 5

No, don’t use an iframe – that makes communication between the documents harder.

There’s an example with two Diagrams, with the second one updated as the user selects a node in the first diagram: Local View

That sample has the two HTMLDivElements arranged on top of each other, rather than next to each other, but that’s easy to arrange with a Flexbox or Grid panel.

That sample also communicates what node is selected in both directions, so as to keep the “current” node selected in both diagrams.

I’m sure you can figure out how to handle more than two diagrams, once you figure out how to do two.