What's the fastest force-directed network graph engine for large data sets?

前端 未结 5 1038
一向
一向 2020-12-25 15:17

We currently have a dynamically updated network graph with around 1,500 nodes and 2,000 edges. It\'s ever-growing. Our current layout en

5条回答
  •  清酒与你
    2020-12-25 15:36

    I wrote a JavaScript-based graph drawing library VivaGraph.js.

    It calculates layout and renders graph with 2K+ vertices, 8.5K edges in ~10-15 seconds. If you don't need rendering part it should be even faster.

    Here is a video demonstrating it in action: WebGL Graph Rendering With VivaGraphJS.

    Online demo is available here. WebGL is required to view the demo but is not needed to calculate graphs layouts. The library also works under node.js, thus could be used as a service.

    Example of API usage (layout only):

    var graph = Viva.Graph.graph(),
        layout = Viva.Graph.Layout.forceDirected(graph);
    
    graph.addLink(1, 2);
    layout.run(50); // runs 50 iterations of graph layout
    
    // print results:
    graph.forEachNode(function(node) { console.log(node.position); })
    

    Hope this helps :)

提交回复
热议问题