Schematex

Org chart

About org charts

An org chart (organizational chart) maps the formal reporting structure of an organization — who manages whom, which teams sit under which leaders, and where open roles and external advisors fit in. HR teams reach for them during headcount planning; founders use them before board meetings; operations managers circulate them when restructuring. Unlike a generic flowchart, an org chart treats people (and positions) as the primary entities, with the hierarchy encoded by indentation or explicit edges.

Schematex follows general org-chart conventions with extensions for open/unfilled positions, matrix (dotted-line) reporting, and assistant relationships. There is no single ISO standard for org charts; the conventions implemented here are drawn from HR practice and software-industry norms. For the authoritative academic background see Fayol (1916) and the Wikipedia article on org charts.

orgchart·§
↘ preview
100%
Acme Corp — Q3 2025 Organizational chart with 15 people and 12 relationships Acme Corp — Q3 2025 Jamie Torres CEO Raj Patel CTO Priya Nair Engineering Lead Alex Kim Senior Engineer Jordan Lee Engineer NEW open "TBH" Frontend Engineer Omar Hassan Engineering Lead Yuki Tanaka Staff Engineer draft "TBH" Senior Engineer $ Maria Santos CFO Nour Ahmed Finance Manager Ellen Wu CPO Tyler Brooks Product Lead Suki Ito Product Lead Dr. Alan Ford Board Advisor
UTF-8 · LF · 18 lines · 878 chars✓ parsed·13.1 ms·14.8 KB SVG

1. Your first org chart

The smallest useful org chart: a three-level hierarchy with one open role.

orgchart·§
↘ preview
100%
Engineering Team Organizational chart with 4 people and 2 relationships Engineering Team Wei Zhang CTO Sam Obi Engineering Lead Ana Rossi Engineer open "TBH" Engineer
UTF-8 · LF · 5 lines · 209 chars✓ parsed·1.1 ms·6.1 KB SVG

Four rules cover 80% of usage:

  1. Start with the keyword orgchart, optionally followed by a quoted title.
  2. Each person is a nodeid: "Name" | "Title" | "Department" [props]. The | separates the name, title, and department fields.
  3. Indentation determines hierarchy — each extra two (or more) spaces moves a node one level deeper under the nearest less-indented node above it.
  4. Declare open roles with open id: or draft id:, and external advisors with advisor id:.

Comments must start with # on their own line (inline trailing // is also stripped).


2. Nodes

A node line has the form [kind] id: fields [props]. The id must match [A-Za-z][A-Za-z0-9_-]*.

2.1 Fields (pipe-separated)

The part after the : and before the optional [props] block is split on |:

alice: "Alice Zhang"                                # name only
alice: "Alice Zhang" | "VP Engineering"             # name + title
alice: "Alice Zhang" | "VP Eng" | "Platform"        # name + title + department
alice: "Alice Zhang" | "VP Eng" | "Platform" | "x@co.com"  # + info line
PositionContentNotes
1stNameQuoted or unquoted
2ndTitle / job levelOptional
3rdDepartmentOptional
4thInfo lineOptional; also settable via note:, email:, phone:, location: props
orgchart·§
↘ preview
100%
Field count demo Organizational chart with 4 people and 2 relationships Field count demo AL Alice BO Bob "CTO" CA Carol "Engineer" DA Dave "VP Sales" "dave@co.com"
UTF-8 · LF · 5 lines · 161 chars✓ parsed·0.7 ms·4.1 KB SVG

2.2 Node kinds

The optional kind keyword before the id changes how the node is rendered:

Keyword(s)KindMeaning
(none)personRegular person
role, openroleOpen / unfilled position
draft, tbhdraftPlanned position, not actively recruiting
advisor, externaladvisorExternal advisor, board member, or contractor
orgchart·§
↘ preview
100%
Node kinds Organizational chart with 5 people and 2 relationships Node kinds Jordan Kim CEO Priya Nair Engineering Lead TBH Senior Engineer HIRING TBH Staff Engineer Dr. Lee Board Advisor
UTF-8 · LF · 6 lines · 289 chars✓ parsed·0.5 ms·6.4 KB SVG

2.3 Node properties

Properties go in [key: value, …] at the end of a node line.

PropertyValuesEffect
role:see table belowRole icon displayed in the avatar
icon:same as role:Alias for role:
department:textOverrides the department field
status:new | leaving | on-leaveStatus pill on the card
avatar-color:hex color (e.g. "#7B1FA2")Avatar background color
gender:male | femaleAvatar silhouette (used when no role icon is set)
note:textInfo line (first one wins)
email:textInfo line
phone:textInfo line
location:textInfo line
assistant-of:node idRenders this node as an assistant to the named node
matrix:space- or comma-separated node idsAdds dotted matrix lines from those nodes to this one
reports:node idExplicit parent override (instead of indentation)
open(bare flag)Marks node as open; equivalent to using role kind keyword
draft or tbh(bare flag)Marks node as draft; equivalent to draft kind keyword
external(bare flag)Marks node as external; equivalent to advisor kind keyword

Role icons — the role: value resolves to a display icon. Accepted keywords (case-insensitive):

KeywordsIcon
ceoCEO
ctoCTO
cfoCFO
cooCOO
cmoCMO
cpoCPO
vpVP
engineer, engineeringEngineer
designer, designDesigner
salesSales
hrHR
legalLegal
ops, operationsOps
marketingMarketing
productProduct
dataData
advisorAdvisor
internIntern
vacantVacant
orgchart·§
↘ preview
100%
People directory Organizational chart with 8 people and 3 relationships People directory Jamie Torres CEO Raj Patel CTO Priya Nair Staff Engineer NEW Jordan Lee Senior Engineer $ Maria Santos CFO Nour Ahmed Finance Manager ON LEAVE Dr. Alan Ford Board Advisor TBH General Counsel
UTF-8 · LF · 9 lines · 470 chars✓ parsed·0.8 ms·8.3 KB SVG

3. Hierarchy

Hierarchy is expressed by indentation — the most common pattern. Each node becomes a child of the nearest node above it that has a smaller indent. Tabs are treated as two spaces.

ceo: "CEO"
  cto: "CTO"           # child of ceo (indent 2)
    eng: "Engineer"    # child of cto (indent 4)
  cfo: "CFO"           # child of ceo (indent 2, same level as cto)

Alternatively, use the reports: property to set a parent explicitly regardless of indentation:

orgchart "Flat file"
ceo: "CEO"
cto: "CTO" [reports: ceo]
eng: "Engineer" [reports: cto]
orgchart·§
↘ preview
100%
Series A Startup Organizational chart with 12 people and 8 relationships Series A Startup Lena Brandt CEO James Osei CTO Platform Lead Engineering Fatima Al-Rashid Backend Engineer Marco Ricci Backend Engineer Frontend Lead Engineering Yumi Tanaka Frontend Engineer NEW open "TBH" Frontend Engineer Diana Russo CPO Chris Obi Product Manager Kai Nakamura CMO draft "TBH" Growth Marketer
UTF-8 · LF · 13 lines · 647 chars✓ parsed·0.9 ms·12.4 KB SVG

4. Edges

Two kinds of edges exist. Most reporting lines come from the indentation hierarchy automatically. You can also write them explicitly — or add matrix (dotted) lines.

OperatorEdge kindMeaning
from -> toreportSolid reporting line
from -.-> tomatrixDotted matrix (indirect) reporting line

Explicit edges require that both node ids are already declared. A report edge created explicitly is not duplicated if the same relationship is already implied by indentation.

Edge labels are supported:

pm1 -.-> design [label: "product partnership"]
orgchart·§
↘ preview
100%
Matrix org Organizational chart with 5 people and 3 relationships Matrix org design partner Ellen Wu CPO Core PM Product Manager Growth PM Product Manager Suki Ito Design Lead Ben Park Data Lead
UTF-8 · LF · 10 lines · 378 chars✓ parsed·0.6 ms·5.4 KB SVG

5. Configuration

config: lines adjust layout and orientation. Each goes on its own line.

Config keyValuesDefaultEffect
directionTD, LRTDTop-down or left-right flow
layouttree, list, directory, compacttreeVisual layout mode

Layout notes:

  • tree — standard hierarchical tree with branching connectors. Best for most org charts.
  • list / directory / compact — compact indented directory view. Good for large headcount lists where tree branching becomes unwieldy.

Tree layout (default) — avatar cards with branching connectors and department color-coding. Best for teams up to ~30 people.

orgchart·§
↘ preview
100%
Acme Engineering — tree Organizational chart with 8 people and 5 relationships Acme Engineering — tree Wei Zhang CTO Platform Lead Engineering Amara Diallo Staff Engineer Ben Novak Senior Engineer draft "TBH" Engineer Growth Lead Engineering NEW Fatima Al-Rashid Senior Engineer Marco Ricci Engineer
UTF-8 · LF · 9 lines · 454 chars✓ parsed·0.7 ms·10.4 KB SVG

List layout — compact directory rows with indent guides. Best for large teams where tree branching becomes unwieldy.

orgchart·§
↘ preview
100%
Engineering Directory — list Organizational directory with 8 people and 5 reporting relationships Engineering Directory — list · Wei Zhang CTO PT Platform Team 3 reports · Amara Diallo Staff Eng · Ben Novak Senior Eng · draft "TBH" Engineer GT Growth Team 2 reports · Fatima Al-Rashid Senior Eng · Marco Ricci Engineer
UTF-8 · LF · 10 lines · 421 chars✓ parsed·1.6 ms·8.4 KB SVG

6. Labels & comments

  • Title: orgchart "Acme Corp" — first line only.
  • Name field: first pipe-delimited field after the colon; may be quoted ("Alice Zhang") or unquoted (Alice).
  • Title/department fields: second and third pipe-delimited fields.
  • Info line: fourth pipe-delimited field, or set via note:, email:, phone:, or location: props. First one encountered wins.
  • Comments: # at the start of a line (after leading whitespace). Inline // is also stripped.

7. Reserved words & escaping

Reserved at line start: orgchart (header), config:, role, open, draft, tbh, advisor, external.

Reserved operator tokens — avoid these sequences inside ids: ->, -.->

ID rules: must match [A-Za-z][A-Za-z0-9_-]*. Names with spaces go in the quoted name field, not the id.

Strings with spaces in props values (e.g. department: "Platform Eng") must be double-quoted.


8. Common mistakes

You wroteParser saysFix
alice: Alice Zhang (unquoted name with space)Parses Alice as the name, Zhang is lost or misreadQuote the name: alice: "Alice Zhang"
open1 open: "TBH"open after the id is not a kind keyword; fails id regexKind keyword comes first: open open1: "TBH"
alice -> bob before either node is declaredOrgchartParseError: Edge references unknown nodeDeclare nodes first, then write edges at the end
config: direction = top-downUnknown value ignored; direction stays TDUse TD or LR
config: layout = compactAccepted — maps to list layoutCorrect; compact, directory, and list all work
alice [matrix: bob charlie]Space-separated ids in matrix: — both are addedAlso works with commas: matrix: "bob, charlie"
Node id with a space: fe leadParser takes fe as the id; lead failsUse underscore: fe_lead
Duplicate idOrgchartParseError: Duplicate node idEach node needs a unique id

9. Grammar (EBNF)

document       = header (blank | comment | config | edge | node)*

header         = "orgchart" ( WS quoted-string )? NEWLINE
quoted-string  = '"' any-char-but-quote* '"'

config         = "config" WS ":" WS key WS "=" WS value NEWLINE
key            = "direction" | "layout"

node           = INDENT* kind? id ":" WS fields ( "[" node-attrs "]" )? NEWLINE
kind           = "role" | "open" | "draft" | "tbh" | "advisor" | "external" | "person"
fields         = field ( "|" field )*
field          = quoted-string | unquoted-text
node-attrs     = node-attr ("," node-attr)*
node-attr      = "role:" role-keyword
               | "icon:" role-keyword
               | "department:" text
               | "status:" ( "new" | "leaving" | "on-leave" )
               | "avatar-color:" quoted-hex
               | "gender:" ( "male" | "female" )
               | "note:" text
               | "email:" text
               | "phone:" text
               | "location:" text
               | "assistant-of:" id
               | "matrix:" id-list
               | "reports:" id
               | bare-flag

bare-flag      = "open" | "draft" | "tbh" | "external"

edge           = id WS edge-op WS id ( "[" edge-attrs "]" )? NEWLINE
edge-op        = "->" | ".->"  // -.-> for matrix
edge-attrs     = "label:" quoted-string

id             = [A-Za-z] [A-Za-z0-9_-]*
comment        = ( "#" | "//" ) any NEWLINE

Authoritative source: src/diagrams/orgchart/parser.ts. If this diverges from the parser, the parser wins — please open an issue.


10. Roadmap

Planned — not yet parseable. Do not use these in generated DSL today; the parser will reject or ignore them.

  • assistant-of: visual rendering — the property is parsed and stored in the AST but the renderer does not yet draw the assistant elbow connector.
  • Config coloring — department-based color themes (coloring: department).
  • Config compact size tiers — explicit card-size control (size: small | medium | large).
  • span: node width — spanning a node across multiple sibling columns in tree layout.
  • Photo / avatar URLavatar: "https://…" to display a real headshot.
  • Export to HRIS formats — JSON/CSV structured output alongside the SVG.

Track in the GitHub issues if you need any of these sooner.