Before you go, check out these stories!

Hackernoon logoMy Top 13 JavaScript Diagram Libraries by@eugene_p

My Top 13 JavaScript Diagram Libraries

Author profile picture


Nowadays, the amount of data grows exponentially, and the more information we see, the more painstaking and time-consuming it gets to analyze it. With the advent of big data, the business world faced the necessity to shift from traditional Excel spreadsheets to more effective ways of data visualization โ€“ colorful and interactive diagrams, charts, dashboards, maps. Thanks to modern data visualization tools, people can spend less time and effort on grasping difficult concepts or identifying new patterns, thus making a significant contribution to more effective decision making.

In most cases, developers resort to using JavaScript, as it is the most universal and easy-to-use technology for data visualization. Currently, there is a large number of JS diagram libraries available on the software market and each one of them has its own pros and cons. In this article, I will try to help developers who are still in quest of a proper diagram library for their projects by reviewing 13 remarkable solutions (presented in alphabetical order).

1) Basic Primitives Diagram

Basic Primitives Diagram is a JavaScript library providing different diagramming components that are utilized for dependencies visualization and analysis. Basic Primitives ensures proper display of complex diagrams within a single screen space without any negative impact on the diagram usability. The auto-layout feature offers a lot of functional capabilities for the overview, editing, and navigation through diagrams. When any changes are introduced to the diagram, special API elements (annotations) are used to show the process of diagram shifting from one state to another.

Written in pure JS without dependency on 3d party libraries, this library supports modern and mobile browsers as well as graphics rendering in VML, SVG, and Canvas modes. One of the most remarkable features of this library is that independently of the license being used (free or commercial), you can download the source code and introduce any kind of changes in it.

Thanks to a full API, developers can add, change, or remove any elements of the diagram or their properties, and the library will render only the elements modified via the API, thereby providing fast rendering and high performance.

Types of supported diagrams: org chart, family tree & inheritance chart, multi-parent hierarchical chart, dependencies visualization, PERT diagram, directed acyclic graph (DAG) visualization, business ownership diagram

Integration with JS frameworks: AngularJS, jQuery, ReactJS

Availability of Diagram Editors: organizational chart editor

Diagram export formats: not found

License and price: non-commercial (free) 3.0 License; commercial licenses from 385$ to 2,145$

2) DHTMLX Diagram

DHTMLX Diagram is a handy JavaScript diagramming library that allows you to add well-structured and interactive diagrams and org charts to your web app. Thanks to its lightweight, the library ensures fast rendering and high performance. The DHTMLX Diagram component makes it possible to build different types of diagrams, including mixed diagrams (diagram + org chart) with the help of a predefined set of shapes and connectors, and custom shapes. All shapes can be complemented with textual data, icons, and images. Zooming and scrolling features ensure more convenient and effective working with large diagrams.

Interestingly, you wonโ€™t need much time to build even the most complex diagram with a great number of shapes, as this library provides an advanced auto-layout algorithm. This powerful feature helps to turn chaotically placed shapes into a well-structured diagram in just a few clicks.

This library is compatible with any server-side technology and supports all popular browsers. But the most remarkable thing about DHTMLX Diagram is the availability of two live editors (one for org charts and one for other types of diagrams). These editors enable you to enrich standard diagrams with custom shapes and change their appearance on the fly using highly-customizable side panels. The possibility to perform standard actions on several shapes (select, move, copy, etc.)ย  at the same time and apply the smart layout algorithm helps to create diagrams of any scale much faster.

Types of supported diagrams: Venn diagram, org chart, UML class diagram, network diagram, flowchart, activity diagram, vertical and horizontal decision tree, block diagram, life cycle diagram

Integration with JS frameworks: Angular, React, Vue. js

Availability of diagram editors: live diagram and org chart editors

Diagram export formats: PDF, PNG, JSON

License and price: commercial licenses from 599$ to 2,899$

3) GoJS

GoJS is a multi-functional JavaScript library intended for building interactive diagrams and graphs in modern web browsers and platforms. Thanks to a variety of customizable templates and layouts implemented in GoJS, developers can easily build JS diagrams of complex nodes, links, and groups.ย 

GoJS delivers a lot of handy features (drag-and-drop, in-place editing, undo/redo, automatic layouts, diagram overviews, etc.) to ensure enhanced user experience and interactivity. The library is known for its flexibility, as the variety of built-in properties and features significantly simplifies customization processes for diagram components.

It should be noted that GoJS is extremely fast, taking full advantage of the HTML Canvas to support high-performance diagramming. Thanks to the familiar model/view architecture and a wide range of interactive samples, it is easy for developers to get started with different types of diagrams. The detailed documentation helps developers to start using this powerful library in no time.

Types of diagrams: flowchart, state chart, sankey diagram, genogram diagram, org chart, dynamic port, industrial process diagram, dynamic grouping diagram, mind map, UML diagram

Integration with JS frameworks: Vue.js Angular, React, Electron

Availability of diagram editors: not found

Diagram export formats: SVG and image formats

License and price: free license (for academic and educational purpose); commercial licenses from 3,495$ to 9,950$

4) Google Organization Chart

Google Charts is a simple and popular tool utilized for data visualization in web applications. In addition to a wide range of standard charts, this library also allows creating neat organizational charts for vivid representations of organization structures and hierarchies. Such charts help businesses to clarify reporting structure, manage workload more efficiently, and optimize planning activities. Thereโ€™s a rich gallery of charts to choose from.

Since all Google org charts are fully configurable and interactive, you can easily create exclusive diagram appearances that perfectly fit into your application. It is possible to easily customize charts via CSS. Thanks to the use of HTML5/SVG, these charts are compatible with all modern browsers and platforms with no need to apply any extra plugins.

Org charts, as well as other types of Google Charts, come with manuals and vivid examples. Each manual includes code for the functions associated with a specific chart and API lists. Google org charts are free-of-charge, but you cannot use Google JS components on a local server, therefore it is not the best option if you work with confidential data. Moreover, there is also limited support (guides and forum only).

Types of diagrams: org chart

Integration with JS frameworks: not found

Availability of diagram editors: not found

Diagram export formats: not found

License and price: Apache 2.0 license (free)

5) JSPlumbtoolkit

The jsPlumb toolkit is a powerful and easy-to-use solution for building JavaScript connectivity-based apps. It utilizes SVG and supports all browsers from IE9 and later versions. jsPlumb Toolkit is a wrapper around the open-source jsPlumb library that offers some essential functionalities required for building a diagram according to your liking: data binding, minimap widget, automatic layouts, panning/zooming, graph operations, loading/saving data, undo/redo actions, etc. Moreover, there is a strong declarative mechanism for setting the look-and-feel and behavior of different parts of your UI.

The library also provides complete integration with mobile devices. With numerous implemented UI features, the Toolkit offers an effective way of creating apps with visual connectivity at their core. The availability of demonstrations and the documentation allows you to get a better understanding of its functionality.

Types of supported diagrams: org chart, flowchart, circular layout, process flow diagrams, sequence diagram

Integration with JS frameworks: Angular, React, Vue

Availability of diagram editors: not found

Diagram export formats: not found

License and price: commercial licenses from 3,500$ to 8,500$

6) Kendo UI

Kendo UI is a proven suite of front-end tools developed by the Progress team that comes with a variety of useful widgets based on jQuery, including the diagramming component, for building data-rich web-applications. This solution makes the most out of HTML5 and CSS3 technologies while supporting modern and fairly old versions of browsers. In applications created using the Kendo UI suite, you can implement data binding, access to templates, animation, drag-and-drop option and much more.

The diagramming component comes into play when it is necessary to enrich the application design with interactive flowcharts, organizational, network, or any diagramming interfaces. Big chunks of information can be vividly presented in Visio-like diagram types. The diagraming control supports the most popular diagram layouts. It is also possible to apply zooming within the constrained space to ensure easy navigation between the high-level views.

The widget offers the editing functionality that allows you to add tools and shapes to your diagram, and utilize its layout options. The variety of embedded skins allows developers to offer end-users vivid UIs and fast performance within a short time, while also utilizing less design resources.

Types of supported diagrams: flowchart, organizational chart, network diagram

Integration with JS frameworks: jQuery, Angular, React, Vue

Availability of diagram editors: editing demo

Diagram export formats: PDF, PNG, SVG

License and price: included in Kendo UI library, commercial licenses from 999 $ to 2,199$ per developer

7) mxGraph

mxGraph is a client-side JS diagramming library that utilizes SVG and HTML for visualization and offers all common functionalities needed for drawing and interaction with diagrams as well as for the integration of your business logic.

Developed by JGraph Ltd in 2005, mxGraph had been successfully used as a commercial software solution until 2016, when it gave way to new frontend technologies and the company made the source code freely available on GitHub. However, mxGraph has not become obsolete and regularly gets fixes and new features, as it is currently used as the stack base of, a popular commercial web diagramming app allowing users to create and share diagrams within a web browser. This application offers illuminating insights into the rich functionality of mxGraph.

In fact, mxGraph mainly consists of one JS file that includes the whole functionality of the library. The library does not require any third-party plugins and can be integrated into any framework. All in all, this library is a feature-packed, production tested and stable solution complemented with user manuals.

Types of supported diagrams: BPMN, UML diagram, flowchart, tree diagram, mind map, network diagram, Venn diagram, rack diagram, sequence diagram, SWOT diagram, floor plan, infographics, electrical diagram, AWS architecture diagram.

Integration with JS frameworks: not found

Availability of diagram editors:ย editor

Diagram export formats: not found

License and price: free under Apache 2.0 license

8) OrgChart JS (BalkanGraph)

OrgChart JS is a powerful and at the same time easy-to-use JS widget that allows you to clearly illustrate the reporting relationships and chains of command within the company of any size and complexity by means of intuitive and interactive organizational charts.

This library provides a package of default skins and color palettes to make the chart appearance fit into the app design. There is also a handy search feature for more convenient operation with big diagrams. Thanks to the integrated edit form, the processes of creating and editing diagram items are greatly simplified โ€“ just input a name, title, some extra info, and OrgChart JS will automatically add the text to the diagram node.

Moreover, this library offers the following useful features: node customization, drag-and-drop, expanding/collapsing, lazy loading, zooming, scroll bars. But one of the best things about OrgChart JS is that it doesnโ€™t require any specific programming skills due to simple configuration syntax (smooth learning curve).

Types of diagrams: org chart

Integration with JS frameworks: Angular, React, Vue. js

Availability of diagram editors: custom edit form

Diagram export formats: PDF, PNG, SVG, CSV

License and price: commercial licenses from 399$ to 4,999$

9) Rappid / Jointjs Core Library

JointJS Core is a full-fledged toolkit for building fully interactive diagramming and modeling apps that support modern browsers, relying on JS and SVG. This library has a lot of built-in features for convenient working with graphs and diagrams (numerous ready-to-use shapes, filters and gradients, interactive elements and links, animations, MVC architecture, flexible plugin system, etc.) and can become an ideal solution for open-source projects.

But when it comes to commercial applications, developers can consider using Rappid, a commercial extension of JointJS Core. It is based on the JointJS foundation and significantly expands its functionality with the help of numerous additional components, allowing you to implement different UI widgets, interaction elements, auto layouts, and other useful tools for creating state-of-the-art visual applications. Comprehensive tutorials will help you to get a deeper insight into the functionality of this product and learn how to use it most efficiently.

Types of supported diagrams: flowchart, BPMN diagram, org chart, UML diagram, tree graps, hand-drawn like diagram

Integration with JS frameworks: AngularJS, Backbone, React, Meteor, and Bootstrap

Availability of Diagram Editors: Rappid kitchen sink

Diagram export formats: JSON, PNG, JPEG, SVG

License and price: Jointjs: open source Mozilla public license v2.0. (free); Rappid: commercial licenses from 1648$ per developer

10) Syncfusion

The Syncfusion diagram library is a feature-rich solution for building interactive diagrams with the help of hundreds of predefined and custom shapes. It enables you to create a simple or complex diagram either via code or a visual interface. Using a wide range of shapes, nodes, connectors and ports, you can vividly illustrate workflow models and business procedures, accompanying diagram components with textual data and labels. It is easy to perform CRUD operations (add, edit, delete) for any nodes or connectors. Virtualization mode helps to quickly load only the visible shapes on the screen, thereby optimizing performance.

Thanks to a large number of interactive features (rotate, select and drag, rotate, grouping, undo/redo), diagrams can be easily edited to your liking. The advanced automatic layout algorithms help to arrange nodes and connectors based on a predetermined layout. To work comfortably with large diagrams, it is possible to use the overview panel and zooming & panning tools. It is also possible to use the serialization feature for saving and loading your diagram state when needed. The main diagram components are accompanied by examples and documentation to give you a clear picture of their functional capabilities.

Types of supported diagrams: flowchart, org chart, mind map, UML class diagram, BPMN, swim-lane diagram.

Integration with JS frameworks: Angular, React, Vue.js, Blazor

Availability of diagram editors: drawing tool

Diagram export formats: PNG, JPEG, BMP, SVG

License and price: included in the Syncfusion UI library, commercial licenses from 995$ per developer

11) Treant.js

Treant.js is a JavaScript library for building simple and colorful tree diagrams with the help of HTML, CSS, and SVG. It utilizes Raphael library for the implementation of SVG and animations. Standard tree structures can be enriched with collapsible and interactive elements. The library offers 2 different standard approaches (Array and JSON) for construction and configuration of tree org charts. The API documentation on Treant.js can be split into 2 major sections: one is related to the standard chart configuration capacities, while the other describes configuration options that can be applied for each separate node.

Types of supported diagrams: tree diagrams

Integration with JS frameworks: not found

Availability of diagram editors: not found

Diagram export formats: not found

License and price: MIT (free)

12) Webix Organogram

Webix Organogram is a JavaScript widget that can be utilized for building hierarchical diagrams that demonstrate relations between staff members in a company or present various elements of some intricate structures. This easy to learn widget inherits API from the TreeStore and DataStore and has rich functionality. It is fully supported in all modern browsers and runs on touch screen devices.ย 

When it comes to functionalities, it should be noted that each element of org charts can be configured (size, padding, margin, HTML markup) according to users' needs. It is possible to fine-tune the appearance of the whole component or each of its elements by using CSS styles and applying templates. It is also possible to actuate selection functionality and to add event-handlers to carry out specific actions after selecting a specific element. And last but not least, this widget allows performing different manipulations with list blocks to display charts with complex hierarchical dependencies in a more comprehensible way.

Types of supported diagrams: org chart

Integration with JS frameworks: jQuery, Angular, React, Vue.js, Backbone

Availability of diagram editors: not found

Diagram export formats: PNG, Excel, PDF, CSV

License and price: included in the package of Webix UI components, commercial licensing from 449$ per developer

13) yFiles for HTML

yFiles for HTML is a part of the popular yFiles product family designed by yWorks for adding sophisticated diagrams to HTML5/JS web applications. This pure JS library offers a variety of UI tools and extended editing capabilities for creating and changing graphs and diagrams of any degree of complexity.

It provides a large diagramming feature set for effective data visualization (dynamic updates, intuitive interaction, automatic diagram arrangement, automatic labeling, vast visual representation possibilities, different routing algorithms, etc.). There is no need to utilize any plugins or server components for creating client-side apps. The availability of the latest rendering technologies (SVG, WebGL, and HTML5 Canvas) gives you more freedom of action in drawing diagrams. The library also supports up-to-date ECMAScript 6 features and allows using TypeScript bindings. Thanks to detailed tutorials and well-structured API documentation, developers can master all peculiarities of this library in no time.

Types of supported diagrams: flowchart, swimlane diagram, UML diagram, org chart, genealogy, business process diagram, social network analysis (diagrams with clustering), nested graphs hierarchies

Integration with JS frameworks: AngularJS, Angular 2+, ReactJS, Vue.js and other JS frameworks.

Availability of diagram editors: online diagram editor

Diagram export formats: VSDX, PDF

License and price: commercial license from 11,900$ per developer


In recent years, the JavaScript library ecosystem for creating diagrams has evolved significantly to meet the growing demand for visualization and efficient analysis of big data in modern business processes. Today, the software market can offer a wide range of diagramming solutions with diverse sets of functionalities and performance characteristics. Thus, it may become quite a tricky task to choose the right diagram library for a specific project.

Fortunately, most of the products described above offer free trial versions to give you an idea of their operating capabilities. Moreover, if you have a tight budget and do not require complex functionalities for your project, then you can make use of mxGraph, Google Charts, or Treant.js. If you are looking for a product with the best price/quality ratio, then it will be reasonable to consider DHTMLX Diagram with its handy editing features and high performance or Basic Primitives with a wide variety of diagram types. In case your project is generously funded, then you can invest in Rappid or yFiles to create diagrams of any complexity level.

When choosing the best diagram library for your needs, it is better to test a couple of libraries using your data. It will help you to find the most appropriate variant for your current or future projects.

To make a long story short, here is a small diagram drawn with the help of DHTMLX diagram editor that can help you choose the most suitable library according to several criteria (open source vs commercial, stand-alone vs part of UI libraries only, variety of shapes, availability of auto layout algorithm and live editors):


The Noonification banner

Subscribe to get your daily round-up of top tech stories!