Which is Better Graph Visualization Libraries?
cytoscape vs dagre-d3 vs vis-network vs gojs vs d3-graphviz
1 Year
cytoscapedagre-d3vis-networkgojsd3-graphvizSimilar Packages:
What's Graph Visualization Libraries?

Graph visualization libraries are essential tools for representing complex relationships and structures through visual means. They allow developers to create interactive and dynamic visual representations of data, making it easier to understand and analyze connections within datasets. These libraries provide various functionalities, including layout algorithms, rendering capabilities, and interactivity, enabling users to explore data in a visually intuitive way.

NPM Package Downloads Trend
Github Stars Ranking
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
cytoscape792,06910,0534.63 MB222 months agoMIT
dagre-d3127,4922,847-2175 years agoMIT
vis-network113,0893,03146.7 MB325a year ago(Apache-2.0 OR MIT)
gojs69,9517,72910.9 MB17 days agoSEE LICENSE IN license.html
d3-graphviz38,3071,6872.92 MB202 months agoBSD-3-Clause
Feature Comparison: cytoscape vs dagre-d3 vs vis-network vs gojs vs d3-graphviz

Interactivity

  • cytoscape: Cytoscape provides extensive interactivity options, allowing users to manipulate nodes and edges dynamically. It supports events like clicks, hovers, and selections, enabling developers to create responsive visualizations that react to user input.
  • dagre-d3: Dagre-d3 supports interactivity through D3.js, enabling users to create interactive graphs. Developers can add custom event handlers to nodes and edges, making it suitable for applications that require user interaction.
  • vis-network: vis-network offers straightforward interactivity features, such as zooming, panning, and dragging nodes. It is user-friendly and allows for quick implementation of interactive elements in visualizations.
  • gojs: GoJS excels in interactivity, providing built-in support for drag-and-drop, context menus, and customizable tooltips. It allows developers to create highly interactive diagrams with minimal effort, making it ideal for complex applications.
  • d3-graphviz: d3-graphviz offers basic interactivity through D3.js, allowing users to interact with rendered graphs. However, it may require additional coding for advanced interactive features, as it primarily focuses on rendering Graphviz graphs.

Layout Algorithms

  • cytoscape: Cytoscape includes a wide range of layout algorithms for different types of graphs, including hierarchical, circular, and organic layouts. This flexibility allows users to choose the most suitable layout for their data representation needs.
  • dagre-d3: Dagre-d3 integrates Dagre's layout algorithms, specifically designed for directed graphs. It automatically calculates optimal layouts, making it easier for developers to visualize complex relationships without manual adjustments.
  • vis-network: vis-network offers several built-in layout algorithms, such as hierarchical and physics-based layouts. It allows users to quickly switch between layouts, making it versatile for different visualization scenarios.
  • gojs: GoJS provides a variety of layout options, including tree, force-directed, and custom layouts. Developers can easily implement different layouts to suit their specific visualization requirements, enhancing the user experience.
  • d3-graphviz: d3-graphviz utilizes Graphviz's powerful layout algorithms to render graphs based on the DOT language. Users can take advantage of these algorithms to create well-structured visualizations with minimal configuration.

Customization

  • cytoscape: Cytoscape allows extensive customization of styles and behaviors, enabling developers to define node shapes, colors, and edge styles. This level of customization makes it suitable for tailored visualizations that meet specific branding or design requirements.
  • dagre-d3: Dagre-d3 allows for customization of node and edge styles through D3.js. While it offers flexibility, the customization options may require more coding compared to other libraries, making it less user-friendly for quick adjustments.
  • vis-network: vis-network provides straightforward customization options for nodes and edges, allowing users to easily change colors, shapes, and sizes. Its simplicity makes it accessible for quick visual adjustments.
  • gojs: GoJS is highly customizable, offering a comprehensive API for defining node templates, styles, and behaviors. Developers can create intricate diagrams with unique designs and interactions, making it suitable for complex applications.
  • d3-graphviz: d3-graphviz provides limited customization options since it focuses on rendering Graphviz graphs. However, users can still modify styles through CSS and D3.js, allowing for some degree of visual customization.

Performance

  • cytoscape: Cytoscape is optimized for handling large graphs efficiently, making it suitable for applications with complex datasets. It employs techniques like incremental rendering to maintain performance even with numerous nodes and edges.
  • dagre-d3: Dagre-d3 performs well with directed graphs, leveraging D3.js for rendering. However, performance may vary based on the complexity of the graph and the number of nodes and edges involved.
  • vis-network: vis-network is optimized for performance, allowing for smooth interactions even with larger datasets. It uses WebGL for rendering, which enhances performance for complex visualizations.
  • gojs: GoJS is designed for high performance, particularly in interactive scenarios. It efficiently manages large diagrams and provides smooth interactions, making it suitable for applications requiring real-time updates.
  • d3-graphviz: d3-graphviz performance depends on the complexity of the Graphviz graphs being rendered. While it can handle moderate-sized graphs well, performance may degrade with very large datasets due to the rendering process.

Learning Curve

  • cytoscape: Cytoscape has a moderate learning curve, especially for users unfamiliar with graph theory concepts. However, its extensive documentation and community support help ease the learning process for new users.
  • dagre-d3: Dagre-d3 has a moderate learning curve, particularly for those already familiar with D3.js. Its integration with D3 makes it easier for developers to learn and implement, especially for those with prior experience in data visualization.
  • vis-network: vis-network is beginner-friendly, with a low learning curve. Its straightforward API and extensive examples make it easy for new users to get started with network visualizations.
  • gojs: GoJS has a steeper learning curve due to its extensive features and API. However, its comprehensive documentation and examples provide a solid foundation for developers to learn and implement complex visualizations.
  • d3-graphviz: d3-graphviz requires familiarity with D3.js and Graphviz syntax, which can pose a challenge for beginners. However, once understood, it allows for powerful visualizations with relatively simple code.
How to Choose: cytoscape vs dagre-d3 vs vis-network vs gojs vs d3-graphviz
  • cytoscape: Choose Cytoscape if you need a robust library for complex graph analysis and visualization, especially for biological data. It offers extensive features for graph manipulation and supports a variety of layouts and styles.
  • dagre-d3: Opt for dagre-d3 if you require a library that combines the layout capabilities of Dagre with the rendering power of D3.js. It is particularly useful for directed graphs and provides automatic layout features.
  • vis-network: Select vis-network if you want a simple and easy-to-use library for network visualization. It is great for quick setups and provides a variety of built-in layouts and styles.
  • gojs: Choose GoJS if you need a commercial solution with extensive features for building interactive diagrams and complex visualizations. It is well-suited for applications requiring advanced user interactions and customizability.
  • d3-graphviz: Select d3-graphviz if you want to leverage the power of D3.js for rendering Graphviz DOT language graphs. It's ideal for users familiar with D3.js who want to create sophisticated visualizations with minimal effort.
README for cytoscape

GitHub repo Ask a question with Phind News and tutorials License npm DOI npm installs Automated tests Extensions Cloudflare

Created at the University of Toronto and published in Oxford Bioinformatics (2016, 2023).
Authored by: Max Franz, Christian Lopes, Dylan Fong, Mike Kucera, ..., Gary Bader

Cytoscape.js

Graph theory (network) library for visualisation and analysis : https://js.cytoscape.org

Description

Cytoscape.js is a fully featured graph theory library. Do you need to model and/or visualise relational data, like biological data or social networks? If so, Cytoscape.js is just what you need.

Cytoscape.js contains a graph theory model and an optional renderer to display interactive graphs. This library was designed to make it as easy as possible for programmers and scientists to use graph theory in their apps, whether it's for server-side analysis in a Node.js app or for a rich user interface.

You can get started with Cytoscape.js with one line:

var cy = cytoscape({ elements: myElements, container: myDiv });

Learn more about the features of Cytoscape.js by reading its documentation.

Example

The Tokyo railway stations network can be visualised with Cytoscape:

A live demo and source code are available for the Tokyo railway stations graph. More demos are available in the documentation.

Documentation

You can find the documentation and downloads on the project website.

Roadmap

Future versions of Cytoscape.js are planned in the milestones of the Github issue tracker. You can use the milestones to see what's currently planned for future releases.

Contributing to Cytoscape.js

Would you like to become a Cytoscape.js contributor? You can contribute in technical roles (e.g. features, testing) or non-technical roles (e.g. documentation, outreach), depending on your interests. Get in touch with us by posting a GitHub discussion.

For the mechanics of contributing a pull request, refer to CONTRIBUTING.md.

Feature releases are made monthly, while patch releases are made weekly. This allows for rapid releases of first- and third-party contributions.

Citation

To cite Cytoscape.js in a paper, please cite the Oxford Bioinformatics issue:

Cytoscape.js: a graph theory library for visualisation and analysis

Franz M, Lopes CT, Huck G, Dong Y, Sumer O, Bader GD

Bioinformatics (2016) 32 (2): 309-311 first published online September 28, 2015 doi:10.1093/bioinformatics/btv557 (PDF)

Build dependencies

Install node and npm. Run npm install before using npm run.

Build instructions

Run npm run <target> in the console. The main targets are:

Building:

  • build: do all builds of the library (umd, min, umd, esm)
  • build:min : do the unminified build with bundled dependencies (for simple html pages, good for novices)
  • build:umd : do the umd (cjs/amd/globals) build
  • build:esm : do the esm (ES 2015 modules) build
  • clean : clean the build directory
  • docs : build the docs into documentation
  • release : build all release artifacts
  • watch : automatically build lib for debugging (with sourcemap, no babel, very quick)
    • good for general testing on debug/index.html
    • served on http://localhost:8080 or the first available port thereafter, with livereload on debug/index.html
  • watch:babel : automatically build lib for debugging (with sourcemap, with babel, a bit slower)
    • good for testing performance or for testing out of date browsers
    • served on http://localhost:8080 or the first available port thereafter, with livereload on debug/index.html
  • watch:umd : automatically build prod umd bundle (no sourcemap, with babel)
    • good for testing cytoscape in another project (with a "cytoscape": "file:./path/to/cytoscape" reference in your project's package.json)
    • no http server
  • dist : update the distribution js for npm etc.

Testing:

The default test scripts run directly against the source code. Tests can alternatively be run on a built bundle. The library can be built on node>=6, but the library's bundle can be tested on node>=0.10.

  • test : run all testing & linting
  • test:js : run the mocha tests on the public API of the lib (directly on source files)
    • npm run test:js -- -g "my test name" runs tests on only the matching test cases
  • test:build : run the mocha tests on the public API of the lib (on a built bundle)
    • npm run build should be run beforehand on a recent version of node
    • npm run test:build -- -g "my test name" runs build tests on only the matching test cases
  • test:modules : run unit tests on private, internal API
    • npm run test:modules -- -g "my test name" runs modules tests on only the matching test cases
  • lint : lint the js sources via eslint
  • benchmark : run all benchmarks
  • benchmark:single : run benchmarks only for the suite specified in benchmark/single

Release instructions

Background

  • Ensure that a milestone exists for the release you want to make, with all the issues for that release assigned in the milestone.
  • Bug fixes should be applied to both the master and unstable branches. PRs can go on either branch, with the patch applied to the other branch after merging.
  • When a patch release is made concurrently with a feature release, the patch release should be made first. Wait 5 minutes after the patch release completes before starting the feature release -- otherwise Zenodo doesn't pick up releases properly.

Patch version

  1. Go to Actions > Feature release
  2. Go to the 'Run workflow' dropdown
  3. [Optional] The 'master' branch should be preselected for you
  4. Press the green 'Run workflow' button
  5. Close the milestone for the release

Feature version

  1. Go to Actions > Feature release
  2. Go to the 'Run workflow' dropdown
  3. [Optional] The 'unstable' branch should be preselected for you
  4. Press the green 'Run workflow' button
  5. Close the milestone for the release
  6. Make the release announcement on the blog

Notes on GitHub Actions UI

  • 'Use workflow from' in the GitHub UI selects the branch from which the workflow YML file is selected. Since the workflow files should usually be the same on the master and unstable branches, it shouldn't matter what's selected.
  • 'Branch to run the action on' in the GitHub UI is preselected for you. You don't need to change it.

Tests

Mocha tests are found in the test directory. The tests can be run in the browser or they can be run via Node.js (npm run test:js).