Can i create org chart? #7238
Unanswered
JeganRavichandran
asked this question in
Q&A
Replies: 1 comment
-
|
You can use subgraphs to accomplish some of what you're looking for. Here’s what this diagram is doing. There’s a CEO at the top, then five VP boxes hanging off it. Each VP lives inside its own little subgraph, and that subgraph tells Mermaid how to lay out the people under that VP.
That’s basically the only layout control we get here: the direction inside each subgraph plus how the lines connect. flowchart TB
CEO[CEO]
CEO --> VP1N
CEO --> VP2N
CEO --> VP3N
CEO --> VP4N
CEO --> VP5N
subgraph SG_VP1["VP1: left-aligned vertical stack"]
direction TB
VP1N --> V1A[A1]
V1A --> V1B[A2]
V1B --> V1C[A3]
end
subgraph SG_VP2["VP2: centered vertical"]
direction TB
VP2N --> V2A[B1]
VP2N --> V2B[B2]
VP2N --> V2C[B3]
end
subgraph SG_VP3["VP3: right-aligned vertical"]
direction TB
VP3N --> V3A[C1]
V3A --> V3B[C2]
V3B --> V3C[C3]
end
subgraph SG_VP4["VP4: balanced tree"]
direction TB
VP4N --> V4A[D1]
VP4N --> V4B[D2]
V4A --> V4A1[D1.1]
V4A --> V4A2[D1.2]
V4B --> V4B1[D2.1]
V4B --> V4B2[D2.2]
end
subgraph SG_VP5["VP5: horizontal row"]
direction LR
VP5N --> V5A[E1]
VP5N --> V5B[E2]
VP5N --> V5C[E3]
VP5N --> V5D[E4]
end
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Flowchart is not a good one for org chart.
Can i create org chart with different layout config for leaf nodes?


Beta Was this translation helpful? Give feedback.
All reactions