---
source: https://www.jointjs.com/demos/tree-graph-and-cycles
github: https://raw.githubusercontent.com/clientIO/joint-demos/main/tree-graph-and-cycles/README.md
generated: 2026-04-05
format: markdown
---

# JointJS+: Tree graph and cycles <a href="https://www.jointjs.com/jointjs-plus"><img src="../jointjs-plus-badge.svg" alt="JointJS+" width="123" align="right" /></a>

Trees are graphs that do not contain cycles. Each node of a tree has exactly one parent (except the root, which has none). This demo shows how to maintain a tree with automatic tree layout, and also how to allow users to add special backlinks that may create cycles but are not taken into account by automatic layout.

This demo is also available online at [jointjs.com](https://jointjs.com/demos/tree-graph-and-cycles).

## Available Versions

- [JavaScript](./js/)

## Screenshot

![screenshot](./screenshot.png)
