gojs vs vis-network
JavaScript Diagram Libraries
gojsvis-networkSimilar Packages:

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 Weekly Downloads Trend

3 Years

Github Stars Ranking

Stat Detail

Package
Downloads
Stars
Size
Issues
Publish
License
gojs08,3989.68 MB113 days agoSEE LICENSE IN license.html
vis-network03,52782.9 MB3446 months ago(Apache-2.0 OR MIT)

Feature Comparison: gojs vs vis-network

Complexity of Diagrams

  • 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.

  • 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.

Customization

  • 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.

  • 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.

Performance

  • 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.

  • 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.

Learning Curve

  • 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.

  • 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.

Documentation and Support

  • 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.

  • 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.

How to Choose: gojs vs vis-network

  • 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.

  • 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.

README for gojs

GoJS, a JavaScript Library for HTML Diagrams

GoJS is a JavaScript and TypeScript library for creating and manipulating diagrams, charts, and graphs.

npm open issues last commit downloads Twitter Follow

See GoJS Samples

Get Started with GoJS

GoJS is a flexible library that can be used to create a number of different kinds of interactive diagrams, including data visualizations, drawing tools, and graph editors. There are samples for flowchart, org chart, business process BPMN, swimlanes, timelines, state charts, kanban, network, mindmap, sankey, family trees and genogram charts, fishbone diagrams, floor plans, UML, decision trees, PERT charts, Gantt, and hundreds more. GoJS includes a number of built in layouts including tree layout, force directed, circular, and layered digraph layout, and many custom layout extensions and examples.

GoJS is renders either to an HTML Canvas element (with export to SVG or image formats) or directly as SVG DOM. GoJS can run in a web browser, or server side in Node or Puppeteer. GoJS Diagrams are backed by Models, with saving and loading typically via JSON-formatted text.

Read more about GoJS at gojs.net

The GitHub repository and the GoJS website contain not only the library, but also the sources for all samples, extensions, and documentation.

However the npm package contains only the library. You can install the GoJS library using npm:

$ npm install gojs

The samples, extensions, and documentation can be installed by running:

$ npm create gojs-kit

You can use the GitHub repository to quickly search through all of the sources.

Minimal Sample

Diagrams are built by creating one or more templates, with desired properties data-bound, and adding model data.

<div id="myDiagramDiv" style="width:400px; height:200px;"></div>

<script src="https://cdn.jsdelivr.net/npm/gojs"></script>

<script>
  const myDiagram = new go.Diagram('myDiagramDiv', {
    // create a Diagram for the HTML Div element
    'undoManager.isEnabled': true // enable undo & redo
  });

  // define a simple Node template
  // the Shape will automatically surround the TextBlock
  myDiagram.nodeTemplate = new go.Node('Auto').add(
    // add a Shape and a TextBlock to this "Auto" Panel
    new go.Shape('RoundedRectangle', { strokeWidth: 0, fill: 'white' }) // no border; default fill is white
      .bind('fill', 'color'), // Shape.fill is bound to Node.data.color
    new go.TextBlock({ margin: 8, font: 'bold 14px sans-serif', stroke: '#333' }) // some room around the text
      .bind('text', 'key') // TextBlock.text is bound to Node.data.key
  );

  // but use the default Link template, by not setting Diagram.linkTemplate

  // create the model data that will be represented by Nodes and Links
  myDiagram.model = new go.GraphLinksModel(
    [
      { key: 'Alpha', color: 'lightblue' },
      { key: 'Beta', color: 'orange' },
      { key: 'Gamma', color: 'lightgreen' },
      { key: 'Delta', color: 'pink' }
    ],
    [
      { from: 'Alpha', to: 'Beta' },
      { from: 'Alpha', to: 'Gamma' },
      { from: 'Beta', to: 'Beta' },
      { from: 'Gamma', to: 'Delta' },
      { from: 'Delta', to: 'Alpha' }
    ]
  );
</script>

The above diagram and model code creates the following graph. The user can now click on nodes or links to select them, copy-and-paste them, drag them, delete them, scroll, pan, and zoom, with a mouse or with fingers.

Click the above image to see the interactive GoJS Diagram

Support

Northwoods Software offers a month of free developer-to-developer support for GoJS to prospective customers so you can finish your project faster.

Read and search the official GoJS forum for any topics related to your questions.

Posting in the forum is the fastest and most effective way of obtaining support for any GoJS related inquiries. Please register for support at Northwoods Software's registration form before posting in the forum.

For any nontechnical questions about GoJS, such as about sales or licensing, please visit Northwoods Software's contact form.

License

The GoJS software license.

The GoJS evaluation license.

Copyright Northwoods Software Corporation