react-force-graph icon indicating copy to clipboard operation
react-force-graph copied to clipboard

How to save a graph?

Open john012343210 opened this issue 2 years ago • 2 comments

I have noticed after passing the nodes and links to the library, that during rendering, the library will add a lot of properties and values into nodes and links (positions ,etc),

what is the important information that I have saved if I only want to include the structure of the graph?

john012343210 avatar Jun 03 '22 12:06 john012343210

@sunset1234321 if all you want is to save the position of the nodes, you just need to store the x, y and z attributes. You can find an overview of the added attributes from the d3-force-d3 docs: https://github.com/vasturiano/d3-force-3d#simulation_nodes

vasturiano avatar Jun 05 '22 19:06 vasturiano

@vasturiano million thanks!!!!!!!!!!!!!

john012343210 avatar Jun 06 '22 17:06 john012343210