I’m wondering what the best method is to accept user input, and to add that user input to already existing data that is used to build a graph. Linked below is a fork of the main D3 force-directed graph notebook, with it’s only addition being a text entry box at the top. This is a simpler example of a problem I’ve been having on a separate notebook - how do I get the new data the user has generated into the existing dataset? I’ve found that a naive
data.nodes.push() does not work. I’m not sure if there’s an easy solution that I’m missing, or if I need to do a large rewrite of most of the notebook’s structure.
Any advice is appreciated!
EDIT: The notebook linked here now functions as desired. If you have any ways it can be improved, feel free to voice them here or in a suggestion on that notebook.