JS library for displaying direct acyclic graphs (DAGs)

后端 未结 2 1076
无人及你
无人及你 2021-01-04 08:12

I am trying to make a browser-based tool that lets you inspect dependency graphs as they appear in module systems of programming languages and Makefiles.

I am lookin

相关标签:
2条回答
  • 2021-01-04 08:29

    In a commercial scenario you might want to consider yFiles for HTML:

    Regarding your requirements it can:

    • Add any number of labels to nodes and edges
    • Provide virtually infinite scrolling/panning/zooming area
    • Layout your graph automatically using a great variety of automatic layout algorithms. For dependency graphs, the Hierarchic Layouter is very well suited
    • works nicely on desktop browsers with larger numbers of nodes. Depending on the visual complexity and graph structure, 5000 elements might proove difficult with todays browser implementations, though.
    • It's a pure Javascript library with no dependencies whatsoever
    • Uses SVG as the main backend, but can also leverage Canvas
    • The library is well documented, which is necessary given its complexity

    Here is a screenshot showing some of the above features in action - the layout was calculated automatically:

    enter image description here

    Disclaimer: I work for the company that creates the library. On SO/SE I do not represent my employer. This is my own post.

    0 讨论(0)
  • 2021-01-04 08:37

    Dagre works pretty well for graph layout (horizontal/vertical alignment, labels, etc.) and has D3 renderer.

    https://github.com/cpettitt/dagre-d3 (check images at the end)

    https://github.com/cpettitt/dagre

    0 讨论(0)
提交回复
热议问题