How to save charts and reload them afterwards.
Users spend a lot of time arranging their networks by dragging nodes around to get a specific view. They will usually want to keep this state for a later point, so a common approach is to enable saving of charts.
This demo 'saves' the state, allowing you to retrieve it later in a load function. Although a real implementation would typically store charts in JSON format on a server, this demo simply saves the state in memory.
If your data is from a database you may want to consider what happens when that data changes. How should a saved chart 'refresh' itself? You may want to warn a user if their data is out of date.
Key functions used: