GoJS is a JavaScript and TypeScript library for creating and manipulating interactive diagrams, charts, and graphs.
The library addresses the need to build rich, interactive visual representations of data and processes in web applications. It works by providing a model-driven architecture where diagrams are constructed from templates with data-bound properties, allowing developers to define how data should be visualized and then populate diagrams with model data. The library renders to either HTML Canvas or SVG, supports export to multiple formats, and can run in browsers or server-side environments including Node and Puppeteer. Built-in layouts include tree, force-directed, circular, and layered digraph arrangements, with additional custom layout extensions available.
GoJS suits projects requiring flowcharts, organizational charts, business process diagrams, swimlanes, timelines, state charts, kanban boards, network visualizations, mind maps, Sankey diagrams, family trees, UML diagrams, Gantt charts, and many other diagram types. The library is particularly valuable when you need users to interact with diagrams—selecting, copying, pasting, dragging, and deleting elements—rather than simply displaying static visualizations. Diagrams are backed by models typically serialized as JSON, making it straightforward to save and load diagram state.
The project maintains a comprehensive repository containing not only the core library but also sources for all samples, extensions, and documentation, with the npm package providing the library alone and extensions published separately. The GitHub repository enables searching through sample source code to understand implementation patterns. The project provides extensive sample implementations covering dozens of diagram types and maintains detailed learning resources and API documentation on its website.