Organisation charts and trees
A hierarchy is cards and the arrows from each parent to its children. With join="trunk", the arrows of
one parent share a trunk and branch out, the way organisation charts are drawn.
org-chart.skemo
//- An organisation chart: shared trunks from each manager
diagram(dir="down")
card#ceo.lead(icon="crown") Camille Martin
| Chief executive
to(cto cfo cpo join="trunk")
card#cto.manager Alex Moreau
| Engineering
to(platform apps join="trunk")
card#cfo.manager Robin Petit
| Finance
card#cpo.manager Sam Leroy
| Product
to(design research join="trunk")
card#platform.team Platform team
| 8 people
card#apps.team Apps team
| 12 people
card#design.team Design
| 4 people
card#research.team User research
| 2 peopleorg-chart.css
.lead { --c: #7048E8; --label: "Executive"; }
.manager { --c: #3E6FC4; --label: "Manager"; }
.team { --c: #2F9E44; --label: "Team"; }How it is written
diagram(dir="down"): the root on top, each level one row lower.to(cto cfo cpo join="trunk")under the root draws one trunk to its three reports. Each report still has its own arrow, so it can have its own style or animation marker.- Children keep the order you wrote them in. A parent is centred over its children.
- A type per level (
.lead,.manager,.team) colours the levels and writes their category above the name.
Name your types after what they mean (.manager, .team). A few class names belong to the
drawing itself and would style a part of every card: avoid .head, .title and .line as
types.
Other trees
The same writing draws any hierarchy: a product breakdown, a decision tree, a file layout. Without join, plain arrows
from one card to several cards of the next row also fork:
trunk.skemo
diagram(dir="down")
card#ceo CEO
to(cto cfo coo join="trunk")
card#cto CTO
card#cfo CFO
card#coo COOFor a tree that grows from a central idea in both directions, use a mind map.
See also
- Arrows: trunks, forks, buses and named joins.
- Styling with CSS: card looks for a lighter chart.
