I am trying to use localStorage with my force-directed graph. I am saving the graph variable every each simulation.on("end", function()) and
graph
simulation.on("end", function())