Edit details:

This editable organizational chart sample color-codes the Nodes according to the tree level in the hierarchy.

Select a node to edit its data values. This sample uses the Data Inspector extension to display and modify Part data. Because this simple app is part of a static web site, there is no way to upload a photograph for a person.

Double click in the diagram background to add a new boss. That uses the ClickCreatingTool with a custom ClickCreatingTool.insertPart to scroll to the new node and start editing the TextBlock for its name .

Drag a node onto another in order to change relationships, if permitted. Right-click or tap-hold a Node to bring up a context menu that allows you to:

  • Add Employee - add a new person as a direct report to this person
  • Vacate Position - remove the information specific to the current person in that role
  • Remove Role - removes the person entirely and changes the direct reports to report to the (former) boss
  • Remove Department - removes the person and whole subtree

To learn how to build an org chart from scratch with GoJS, see the Getting Started tutorial.

If you want to have some "assistant" nodes on the side, above the regular reports, see the Org Chart Assistants sample, which is a copy of this sample that uses a custom TreeLayout to position "assistants" that way.

Diagram Model saved in JSON format: