Unify Applications
Logo
Organization Chart

Organization Chart

Logo

6 mins READ

Overview

The Org Chart block draws an interactive hierarchy from any flat list of records. You bind a data list, point Primary Key at each record's own ID and Parent Key at the ID it reports to, and the block lays the tree out automatically, with an optional hover Preview Card. Each node is a fully composable card you design like any other part of your app.

organization_chart.png
organization_chart.png

A new Org Chart arrives pre-built with an avatar-name-role card and a manager preview card.

Tip: Use it for reporting lines, team structures, or any parent-child hierarchy stored as flat records with an ID and a parent-ID column. For tabular people data without hierarchy, prefer a Table. For data that is already nested (children stored inside each record), use Tree View. The Org Chart renders tree-shaped hierarchies only and is not suited to free-form node-and-edge diagrams.

Note: The Org Chart is available in web apps only. It does not render in mobile apps, so use a Table or a list there.

Content Properties

Property

Type

Default

Description

Data (data)

list of records (bindable)

Sample list of 10 employees

The flat list of records to chart. Each record becomes one node. No nesting required — the block builds the tree from the key relationships.

Primary Key (primaryKey)

field mapping

userId

The field in each record that uniquely identifies it — the node's own ID.

Parent Key (parentKey)

field mapping

managerId

The field holding the ID this record reports to. Root nodes have no value here.

Initially focused node (initialFocusId)

string (bindable)

u7 (a person in the sample data)

On load, the chart focuses this node and highlights its whole reporting line up to the root. Bind to the signed-in user's ID for a "your place in the org" view.

Slots → Preview Card (slots)

slot

Pre-filled card

A floating card shown when the user hovers a node. Pre-filled on new blocks with the person's photo, name, role, and manager details.

Appearance Properties

Property

Type

Default

Description

Orientation (orientation)

Vertical | Horizontal

Vertical

Tree grows downwards (Vertical) or left-to-right (Horizontal).

Edge Appearance → Default Edge

Color, Style (Solid | Dashed | Dotted)

Light gray, Solid

How the connecting lines between nodes are drawn.

Edge Appearance → Focused Edge

Color, Style (Solid | Dashed | Dotted)

Brand color, Solid

How the lines on the highlighted path, from the focused node up to its root, are drawn.

Styles (styles)

style set

Full width, 640px height

Width/height, margin, padding, background, border, position.

Visibility (visibility)

condition

—

Shows or hides the whole block.

Events

EventTriggerPayload
On Select NodeUser clicks a nodeselectedItemKey (the node's Primary Key value), selectedItem (the full record)

Methods

Method

Parameters

Description

Highlight Node

nodeId (the node's Primary Key value)

Focuses the node and highlights its reporting line up to the root. An unknown ID clears the highlight.

Node Context Bindings

The block exposes no top-level state keys. Inside the node card and preview card, each node's details are available as context:

Binding

Type

Description

{{ id.context.item }}

object

The full record behind the node being rendered

{{ id.context.isFocusedUser }}

boolean

Is Focused Node — true on the focused node

{{ id.context.isAncestorOfFocusedUser }}

boolean

Is Ancestor of Focused Node

{{ id.context.isDescendantOfFocusedUser }}

boolean

Is Descendant of Focused Node

{{ id.context.childCount }}

number

Child Count — number of direct children of the node

{{ id.context.descendantCount }}

number

Descendant Count — number of direct and indirect children of the node

Behavior & Gotchas

⚠ Nothing renders until data, Primary Key, and Parent Key are all set

The chart area stays empty — no error, no placeholder — when the bound data is empty or either key mapping is missing. If your chart is blank, check all three first.

⚠ A parent ID matching no record promotes the node to root

A record whose Parent Key points at an ID absent from the data is kept but promoted to a top-level root. Filtering the data to one department strands members whose manager was filtered out — they float to the top.

⚠ Initial Focus ID must match a Primary Key value exactly

When Initially focused node matches no record, the chart loads with no focus and no highlight — silently. Bind it to a value you know exists (e.g., the signed-in user's ID).

⚠ Circular parent references split the tree

If records form a reporting loop (A reports to B and B reports to A), every node in the loop stays on the chart, but each one shows as its own top-level root with no reporting line. Records that report to a node in the loop also move to the top. There is no warning, so if a team looks disconnected, check for circular parent references.

⚠ Multiple parents and duplicate IDs

If Parent Key holds a list of IDs, the node is drawn under the alphabetically first parent and the other parents are grouped. Records with a duplicate Primary Key, or an ID that is not text or a number, are skipped.

Common Patterns

Employee Directory with Reporting Lines

  1. Bind flat employee data: Bind Data to your employee records query. Set Primary Key to userId and Parent Key to managerId.

  2. Set initial focus to current user: Bind Initially focused node to the signed-in user's employee ID so the chart opens highlighting their position.

  3. Design the node card: Select the node card in the canvas. Bind the avatar's image to {{ orgChart1.context.item.photo }}, the name text to {{ orgChart1.context.item.name }}, and the role text to {{ orgChart1.context.item.role }}.

  4. Drive a detail panel from On Select Node: On On Select Node, open a Drawer or side panel bound to {{ orgChart1.events.onSelectItem.selectedItem }} to show the full employee profile.

Block

Relationship

Tree View

For data that is already nested, with expand/collapse; it does not build the tree from flat parent-ID records

Kanban

For stage-based item pipelines with drag-and-drop between columns

Table

Prefer for tabular people data without hierarchy

FAQs

What fields are required for the Org Chart to render?

At minimum, each record needs a unique identifier field (mapped to Primary Key, e.g., userId) and a parent reference field (mapped to Parent Key, e.g., managerId). The root node(s) are records whose managerId is null, empty, or self-referential. Without these two fields correctly mapped, the chart renders nothing.

Can I customize what information appears in each org chart node?

Yes. Each node is a card you design like any other part of your app. Select the node card on the canvas and add the blocks you want (for example, an Avatar, a name Text and a title Text). Bind them to the node's record with bindings like {{ orgChart1.context.item.name }}. The Preview Card slot is separate: it controls the floating card shown when the user hovers a node.

How do I navigate to a specific person in a large org chart?

Set Initially focused node to the primary key of the person you want focused on load. You can also bind it dynamically — for example, to a search input's value. To move the focus after the page loads, call the block's Highlight Node method with a Trigger Component Method action and pass the person's primary key as the node ID.

Why does my org chart show a flat list instead of a hierarchy?

Check that your Parent Key field contains the primary key of the parent node (not a display name or other identifier). Also verify that the root nodes have a null or missing parent key. A record whose parent ID matches no record in the data shows as a top-level root, so filtering a manager out of the data moves their whole team to the top. Circular parent references (A reports to B, B reports to A) have the same effect: each node in the loop shows as its own root.