# GoJS: a commercial JavaScript diagramming library for flowcharts, org charts and graph editors

> GoJS builds interactive diagrams from templates and JSON-backed models, rendering to Canvas or SVG. It installs from npm, but the licence is commercial, so the real decision is whether you need its editing features enough to pay for them.

**NorthwoodsSoftware/GoJS** — JavaScript diagramming library for interactive flowcharts, org charts, design tools, planning tools, visual languages.

- Repository: https://github.com/NorthwoodsSoftware/GoJS
- Website: http://gojs.net
- Stars: 8,484 · Forks: 2,828
- Language: JavaScript
- License: NOASSERTION
- Published: 2026-09-21 · Updated: 2026-09-21 · Language: en
- Canonical page: https://hysenlabs.com/projects/northwoodssoftware-gojs

## What GoJS is for, and who ends up paying for it

GoJS is a JavaScript and TypeScript library for creating and manipulating diagrams, charts and graphs. The README lists the shapes of diagram it targets: flowchart, org chart, business process BPMN, swimlanes, timelines, state charts, kanban, network, mindmap, sankey, family trees and genograms, fishbone diagrams, floor plans, UML, decision trees, PERT charts and Gantt. That list is the product definition. GoJS is not a charting library that draws a fixed picture from a data array; it is aimed at diagrams a person manipulates.

The audience follows from that. If your users select nodes, drag them, copy and paste them, delete them, scroll, pan and zoom with a mouse or with fingers, the library is doing work a static renderer cannot do. The minimal sample in the README says exactly this: after the model is set, the user can click nodes or links to select them, copy-and-paste them, drag them, delete them, and navigate the canvas. That sentence is the boundary. A read-only org chart on a marketing page does not need GoJS. A diagram editor embedded in an internal tool does.

The commercial framing is not hidden. The repository root contains license.html, evaluationLicense.html and nonCommercialLicense.html, and package.json declares "license": "SEE LICENSE IN license.html". Northwoods Software also offers a month of free developer-to-developer support to prospective customers, and the README routes nontechnical questions about sales or licensing to the company rather than to the issue tracker. Read those files before you build a dependency on the library, because the answer to whether GoJS is free depends on which of them applies to you.

## Templates, models and the JSON round trip

The architecture has three moving parts. A Diagram is attached to an HTML div. One or more templates describe how data becomes visual objects. A Model holds the data, and the README states that saving and loading is typically via JSON-formatted text.

Templates are built from panels and parts. In the minimal sample, a Node template is an Auto panel containing a Shape and a TextBlock, and properties are bound to data fields: Shape.fill is bound to Node.data.color, TextBlock.text is bound to Node.data.key. The comment in the sample notes that the Shape automatically surrounds the TextBlock, so layout inside a node is handled by the panel rather than by coordinates you compute. If you do not set a link template, the default one is used.

The model in that sample is a GraphLinksModel constructed from two arrays: node data objects with key and color, and link data objects with from and to. Keys are the join between the two arrays. This is the data flow that matters for integration: your application state maps onto node and link arrays, the diagram renders them, and edits flow back into the model, which you serialize as JSON.

Rendering has two targets. The README states that GoJS renders either to an HTML Canvas element, with export to SVG or image formats, or directly as SVG DOM. It also states that GoJS can run in a web browser, or server side in Node or Puppeteer. Server-side rendering is the interesting case: the same templates that drive the interactive editor can produce an export without a browser session, which is why teams that already own the diagram definitions sometimes generate images from them.

## Installing GoJS from npm and drawing a first diagram

The npm package contains only the library. The README is explicit that samples and documentation are not on npm and live in the GitHub repository and on the website, so a fresh install gives you the runtime, not the examples. Install with the command the README gives:

```bash
npm install gojs
```

Extensions are published separately, so layout or tooling that is not part of the core library comes from a second package:

```bash
npm install gojs-extensions
```

The README's minimal sample loads GoJS from a CDN and builds a diagram in a script tag. The page needs a div with an explicit size, because the diagram fills its host element:

```html
<div id="myDiagramDiv" style="width:400px; height:200px;"></div>
<script src="https://cdn.jsdelivr.net/npm/gojs"></script>
```

The script creates the Diagram against that div and enables undo and redo through the undoManager.isEnabled property, then defines a node template and assigns a model:

```js
const myDiagram = new go.Diagram('myDiagramDiv', {
  'undoManager.isEnabled': true
});
myDiagram.nodeTemplate = new go.Node('Auto').add(
  new go.Shape('RoundedRectangle', { strokeWidth: 0, fill: 'white' }).bind('fill', 'color'),
  new go.TextBlock({ margin: 8, font: 'bold 14px sans-serif', stroke: '#333' }).bind('text', 'key')
);
```

The model is the last piece. The README's example passes four nodes and five links, including a self-link from Beta to Beta, which is a useful detail: the default link template handles it without extra configuration.

```js
myDiagram.model = new go.GraphLinksModel(
  [ { key: 'Alpha', color: 'lightblue' }, { key: 'Beta', color: 'orange' } ],
  [ { from: 'Alpha', to: 'Beta' } ]
);
```

After this runs, the div shows two nodes and a link, and the user can select, drag, copy, paste, delete, scroll, pan and zoom. If you are working with an AI coding assistant, the repository ships llms.txt and the full TypeScript API surface as gojs/release/go.d.ts, which the README says orients agents toward idiomatic GoJS 4.0+ code using typed constants such as go.Figures and go.Arrowheads and the fluent new go.Node(...).add(...) form.

## Where GoJS gets in the way

The npm package is not the whole project, and that trips people up early. Samples, documentation and extensions are not in the gojs package; the README says the package contains only the library and that extensions ship as gojs-extensions. If you want a layout or tool that is not in core, you are adding a second dependency and reading source in the repository rather than on npm.

The version numbers in the repository do not line up. The recent releases list v4.0.4 at 2026-09-14, while package.json still reads "version": "4.0.3". That is a normal lag between a release and a manifest bump, but it means you should check what npm actually resolves rather than trusting the file you are reading.

The licence is the largest constraint, and it is not a footnote. The README's support section separates technical questions, which belong on the GoJS forum, from sales and licensing questions, which go to Northwoods Software. A library that routes licensing to a sales channel is one where the cost is a real line item. There is also a maintenance cost that comes with any template-driven editor: templates are code, bindings are code, and a model schema change ripples through both. The library gives you undo and redo for free, but it does not design your node schema for you.

One more boundary worth naming: the README does not document rollback, migration between major versions, or what changed between 4.0.0 and 4.0.4. If you are upgrading across a major version, the release notes are the place to look, and the repository's README does not cover them.

## GoJS against JointJS and hand-rolled SVG

The most common comparison people search for is JointJS, and the honest difference is not in the drawing. Both are JavaScript diagramming libraries with commercial licensing models, and both target interactive editors rather than static charts. The difference that shows up in the README is scope of built-in layouts and samples. GoJS documents tree layout, force directed, circular and layered digraph layout as built-ins, with many custom layout extensions and examples alongside them, and it publishes a sample index covering flowchart, BPMN, swimlanes, kanban, sankey, Gantt, PERT and more.

The other alternative is writing it yourself on SVG or Canvas. That is a legitimate choice for a small, fixed diagram: a handful of boxes, straight connectors, no editing. The moment you add selection, dragging, undo and redo, copy and paste, and JSON persistence with keys joining nodes to links, you are rebuilding the parts the minimal sample gives you in about twenty lines. The trade is control against time.

Where GoJS is the wrong tool is equally clear. If the diagram is decorative, or if a general charting library already draws what you need, the template and model layer is overhead. If your licence situation cannot accommodate a commercial library, no amount of sample coverage changes that, and the repository's own licence files are the thing to read rather than a comparison table.

## Licence, support and the cost of staying current

The repository ships three licence documents: license.html, evaluationLicense.html and nonCommercialLicense.html. package.json does not name an SPDX identifier; it points at the file with "SEE LICENSE IN license.html". That is a deliberate arrangement, and it means the terms live in prose you have to read, not in a short identifier you can scan. Nothing here is legal advice, and the practical step is to read those files with whoever handles licensing at your organisation before the library reaches production.

Support has a defined shape. Northwoods Software offers a month of free developer-to-developer support to prospective customers, and the README directs technical questions to the GoJS forum, with registration through the company's registration form before posting. That is a narrower channel than a public issue tracker, and it is worth knowing before you plan an escalation path.

Upgrade cost is visible in the release cadence. v4.0.0 arrived on 2026-06-16, v4.0.3 on 2026-07-23 and v4.0.4 on 2026-09-14, so patch releases have been landing every few weeks since the major version. The last push to the repository was on 2026-09-14. Frequent patches are cheap to absorb; the major version is the one that costs, and the README does not describe what 4.0 changed relative to 3.x. Check that before committing to an upgrade window.

## Conclusion

Adopt GoJS when you are building an editor rather than a picture: node and link templates, undo and redo, copy and paste, and model-driven JSON persistence are the product, and the samples for flowchart, org chart, BPMN and swimlanes are the fastest way to judge fit. Do not adopt it for a static chart that a simpler renderer could draw, and do not assume the npm package gives you a permissive licence; the repository carries license.html, evaluationLicense.html and nonCommercialLicense.html, and package.json declares "SEE LICENSE IN license.html". Before writing code, open the flowchart sample, confirm which licence file applies to your use, and check whether the layout you need is in the library or in the separately published gojs-extensions package.

## FAQ

### Is GoJS free to use?

The repository does not answer this with a single licence identifier. package.json declares "SEE LICENSE IN license.html", and the repository root also contains evaluationLicense.html and nonCommercialLicense.html, so the applicable terms depend on which of those files covers your use. Read them rather than assuming an open source licence.

### How can I create interactive diagrams with GoJS?

Attach a go.Diagram to an HTML div, define a node template with data-bound properties, then assign a go.GraphLinksModel built from node and link arrays. The README's minimal sample enables undo and redo with the undoManager.isEnabled property and leaves the default link template in place.

### How can I create a flowchart in JavaScript with GoJS?

The README points to a dedicated flowchart sample on the GoJS website, and the same template-and-model pattern from the minimal sample is the starting point. The library also ships built-in layouts including tree, force directed, circular and layered digraph layout.

### Is JointJS free to use?

The repository does not cover JointJS licensing, so this cannot be answered from it. The only comparable statement it supports is that GoJS routes sales and licensing questions to Northwoods Software and ships its own licence files.

## Sources

- [Issues](https://github.com/NorthwoodsSoftware/GoJS/issues)
- [NorthwoodsSoftware/GoJS on GitHub](https://github.com/NorthwoodsSoftware/GoJS)
- [Project website](http://gojs.net)
- [README](https://github.com/NorthwoodsSoftware/GoJS/blob/master/README.md)
- [Releases](https://github.com/NorthwoodsSoftware/GoJS/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/northwoodssoftware-gojs
