Created
August 13, 2025 19:50
-
-
Save DougAnderson444/2ea6494fb279d18b4ccb81a8d842c438 to your computer and use it in GitHub Desktop.
Graphviz example: organization chart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from https://renenyffenegger.ch/notes/tools/Graphviz/examples/organization-chart | |
// Inspired by | |
// https://stackoverflow.com/a/7374543/180275 | |
digraph ORG { | |
ranksep=0.2; | |
node[shape=box3d width=2.3 height=0.6 fontname="Arial"]; | |
CEO [ label = "Important CEO" ] | |
CFO [ label = "Less important CFO" ] | |
HR [ label = "Human Resources" ] | |
CxO [ label = "An unknown CxO" ] | |
staff_1 [ label = "Staff 1"] | |
staff_2 [ label = "Staff 2"] | |
staff_3 [ label = "Staff 3"] | |
staff_4 [ label = "Staff 4"] | |
node[shape=none, width=0, height=0, label=""]; | |
edge[dir=none]; | |
CEO -> hierarchy_1 -> hierarchy_2 -> hierarchy_3; | |
{rank=same; CFO -> hierarchy_1 -> HR;} | |
{rank=same; CxO -> hierarchy_2;} | |
{rank=same; staff_1 -> staff_2 -> hierarchy_4 -> staff_3 -> staff_4 } | |
hierarchy_3 -> hierarchy_4 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment