Which is Better JavaScript Diagram Libraries?
vis-network vs gojs
1 Year
vis-networkgojsSimilar Packages:
What's JavaScript Diagram Libraries?

JavaScript diagram libraries are tools designed to facilitate the creation and manipulation of diagrams, graphs, and visual representations of data in web applications. These libraries provide developers with the ability to create interactive and dynamic visualizations, enhancing user experience and data comprehension. They are particularly useful in applications that require complex data relationships to be represented visually, such as flowcharts, organizational charts, and network diagrams. By leveraging these libraries, developers can save time and effort in building custom solutions while ensuring high-quality visual output.

NPM Package Downloads Trend
Github Stars Ranking
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
vis-network117,2673,07846.7 MB330a year ago(Apache-2.0 OR MIT)
gojs69,1747,81510.9 MB15 days agoSEE LICENSE IN license.html
Feature Comparison: vis-network vs gojs

Complexity of Diagrams

  • vis-network: Vis-network is designed primarily for network visualizations, focusing on simplicity and ease of use. While it supports basic graph types, it may not handle highly complex diagrams as effectively as GoJS, making it more suitable for straightforward network relationships.
  • gojs: GoJS excels in handling complex diagrams, offering a wide array of features such as customizable nodes, links, and layouts. It supports advanced diagram types like flowcharts, mind maps, and organizational charts, making it suitable for applications that require intricate visual representations and detailed interactions.

Customization

  • vis-network: Vis-network offers a more limited set of customization options compared to GoJS. While it allows for basic styling and configuration, it may not provide the same depth of customization, making it less suitable for applications requiring unique visual designs.
  • gojs: GoJS provides extensive customization options, allowing developers to define their own node and link templates, styles, and behaviors. This level of customization enables the creation of highly tailored diagrams that fit specific application needs, offering flexibility in design and interaction.

Performance

  • vis-network: Vis-network is lightweight and performs well for smaller datasets and simpler visualizations. However, performance may degrade with larger datasets or highly complex graphs, as it lacks some of the advanced optimization features found in GoJS.
  • gojs: GoJS is optimized for performance, capable of handling large datasets and complex diagrams efficiently. It employs techniques such as virtual rendering and incremental updates to ensure smooth interactions, even with extensive visual elements, making it suitable for high-performance applications.

Learning Curve

  • vis-network: Vis-network is generally easier to learn and use, making it accessible for developers who need to implement basic network visualizations quickly. Its straightforward API and documentation facilitate rapid development, appealing to those with less experience.
  • gojs: GoJS has a steeper learning curve due to its extensive feature set and customization capabilities. Developers may need to invest time in understanding its API and concepts to fully leverage its potential, especially for complex diagramming needs.

Documentation and Support

  • vis-network: Vis-network also provides good documentation and examples, but it may not be as extensive as GoJS. While it covers the essential features, developers may find fewer resources for advanced use cases or troubleshooting.
  • gojs: GoJS offers comprehensive documentation, including tutorials, examples, and a supportive community. This extensive resource helps developers effectively utilize the library's features and troubleshoot issues, enhancing the overall development experience.
How to Choose: vis-network vs gojs
  • vis-network: Choose vis-network if you prefer a simpler, more lightweight solution for creating network graphs and visualizing relationships. It is particularly well-suited for applications that require quick setup and ease of use, allowing for rapid development of interactive network visualizations.
  • gojs: Choose GoJS if you need a powerful and feature-rich library that supports complex diagrams with extensive customization options, including advanced layouts, templates, and data binding. GoJS is ideal for applications requiring intricate visualizations and interactivity, such as flowcharts or organizational charts.
README for vis-network

vis-network

example chart

Network is a visualization to display networks and networks consisting of nodes and edges. The visualization is easy to use and supports custom shapes, styles, colors, sizes, images, and more. The network visualization works smooth on any modern browser for up to a few thousand nodes and edges. To handle a larger amount of nodes, Network has clustering support. Network uses HTML canvas for rendering.

Badges

semantic-release Renovate npm

dependencies Status devDependencies Status peerDependencies Status

GitHub contributors Backers on Open Collective Sponsors on Open Collective

Install

Install via npm:

$ npm install vis-network

Example

A basic example on loading a Network is shown below. More examples can be found in the examples directory of the project.

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Network</title>
    <script
      type="text/javascript"
      src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"
    ></script>
    <style type="text/css">
      #mynetwork {
        width: 600px;
        height: 400px;
        border: 1px solid lightgray;
      }
    </style>
  </head>
  <body>
    <div id="mynetwork"></div>
    <script type="text/javascript">
      // create an array with nodes
      var nodes = new vis.DataSet([
        { id: 1, label: "Node 1" },
        { id: 2, label: "Node 2" },
        { id: 3, label: "Node 3" },
        { id: 4, label: "Node 4" },
        { id: 5, label: "Node 5" },
      ]);

      // create an array with edges
      var edges = new vis.DataSet([
        { from: 1, to: 3 },
        { from: 1, to: 2 },
        { from: 2, to: 4 },
        { from: 2, to: 5 },
        { from: 3, to: 3 },
      ]);

      // create a network
      var container = document.getElementById("mynetwork");
      var data = {
        nodes: nodes,
        edges: edges,
      };
      var options = {};
      var network = new vis.Network(container, data, options);
    </script>
  </body>
</html>

Build

To build the library from source, clone the project from github

$ git clone git://github.com/visjs/vis-network.git

The source code uses the module style of node (require and module.exports) to organize dependencies. To install all dependencies and build the library, run npm install in the root of the project.

$ cd vis-network
$ npm install

Then, the project can be build running:

$ npm run build

Test

To test the library, install the project dependencies once:

$ npm install

Then run the tests:

$ npm run test

Contribute

Contributions to the vis.js library are very welcome! We can't do this alone!

Backers

Thank you to all our backers! 🙏

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

License

Copyright (C) 2010-2018 Almende B.V. and Contributors Copyright (c) 2018-2021 Vis.js contributors

Vis.js is dual licensed under both

  • The Apache 2.0 License http://www.apache.org/licenses/LICENSE-2.0

and

  • The MIT License http://opensource.org/licenses/MIT

Vis.js may be distributed under either license.