anvaka / ngraph

Beautiful Graphs
MIT License
1.41k stars 131 forks source link

Render graph server (node) side #27

Open rom1504 opened 7 years ago

rom1504 commented 7 years ago

Is there some module that make it possible to render graphs (as svg image for example) server side (from node) ?

anvaka commented 7 years ago

I think you need ngraph.forcelayout to get the layout. After a few iterations you just go over each node in the graph and get their positions from layout (similar to this demo). Once you have positions, it should be trivial to render SVG document for each node.