graph - Drawing a Work Breakdown Structure (WBS) with dot -


i want draw wbs dot language.

i have several problems:

  • changing rank direction (top bottom first level, kind of left right other levels).
  • one edge links more 2 nodes

i tried:

digraph {     rankdir = tb;     graph [splines=ortho]     node [shape=box]     edge [dir=none]      node [label="1 widget mgmt. system"] 1     node [label="1.1 initiation"] 1.1     node [label="1.1.1 evaluation"] "1.1.1"     node [label="1.2 planning"] 1.2     node [label="1.2.1"] "1.2.1"     node [label="1.2.1.1"] "1.2.1.1"     node [label="1.2.1.2"] "1.2.1.2"     node [label="1.2.2"] "1.2.2"      1 -> {1.1, 1.2}     1.2 -> {"1.2.1", "1.2.2"}     "1.2.1" -> {"1.2.1.1", "1.2.1.2"} } 

enter image description here

here result want : wbs example

the graph below shows idea of using clusters , hidden nodes alignment.

digraph {     newrank=true;     graph [splines=ortho];     node [shape=box];     edge [dir=none];     style=invis;//comment line see ideas of using clusters      1 -> {11 12 13};      subgraph cluster_11 {         11 -> {111 112 113 114};         {             node [style=invis];             edge [style=invis];             subgraph cluster_c11_lvl_1 {                 c11->111->112->113->114;             }             {rank=same 11 c11}         }     }      subgraph cluster_12 {         12 -> {121 122};         121 -> {1211 1212};         122 -> {1221 1222};         {             node [style=invis];             edge [style=invis];             subgraph cluster_c12_lvl_1 {                 c12->121->122;             }             subgraph cluster_c12_lvl_2 {                 c121->1211->1212->c122->1221->1222;             }             {rank=same 12 c12}             {rank=same 121 c121}             {rank=same 122 c122}         }     }      subgraph cluster_13 {         13 -> {131 132 133}         {             node [style=invis];             edge [style=invis];             subgraph cluster_c13_lvl_1 {                 c13->131->132->133;             }             {rank=same 13 c13}         }     } } 

it gives following result:

enter image description here


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -