How to add Node data and Link data dynamically in GoJS?
Node data (source: GoJS docs, class Model):
If you want to add or remove node data from the nodeDataArray, call the addNodeData or removeNodeData methods.
Link data (source: GoJS docs, class GraphLinksModel):
If you want to add or remove link data from the linkDataArray, call the addLinkData or removeLinkData methods. If you want to modify the node a link connects to, call the setFromKeyForLinkData and/or setToKeyForLinkData methods.