Description
@antv/hierarchy is an open source TypeScript library of layout algorithms for drawing hierarchical data such as trees, dendrograms and mind maps. It works out where each node should sit, so you can draw the result with your own rendering code. Four layout types are included: compactBox, a tidy tree that is compact both horizontally and vertically; dendrogram; indented; and mindmap, which the README says is inspired by XMind. Layouts can run left to right, right to left, top to bottom, bottom to top, or horizontally and vertically. The package ships as ES modules, which allow tree-shaking, and as UMD builds, and it includes TypeScript definitions for editor support. It is aimed at developers who build charts or diagrams of hierarchical data in JavaScript or TypeScript.…
Highlights
- compactBox, dendrogram, indented and mindmap layouts
- Several flow directions, horizontal and vertical
- ES module and UMD builds
- TypeScript definitions included
Ratings & Reviews
No ratings yet
Be the first to rate Hierarchy.
People also visit
Hierarchy FAQ
What is @antv/hierarchy?
A JavaScript and TypeScript library that calculates layouts for hierarchical data such as trees and mind maps. It returns node positions for you to draw.
How do I install it?
The README covers installation, with an ES module import recommended and a CommonJS option. Check its Installation section for the current steps.
Which layouts are included?
compactBox, a compact tidy tree; dendrogram; indented; and mindmap. The README shows demos of each in several directions.
Is it open source?
Yes. The source is public on GitHub in the antvis organization.
What are the best Hierarchy alternatives?
Popular alternatives to Hierarchy include Graphisual, Familytreeprints and Markmap. See all Hierarchy alternatives



