1

How i modify the last code in link (Work breakdown structure (WBS) TikZ), to make a WBS structure, like a image WBS Image.

I don't know how to introduce a new level in wbs example.

Thanks!!!

Best Regards, Felipe Fonseca

  • Welcome! See http://tex.stackexchange.com/questions/46476/tikz-tree-edge-alignment-in-horizontal-org-chart. There are now numerous examples of this kind of structure on the site. Why don't you show us the bit of the tree you've got without the new level and we'll show you how to add a level? (The code should hopefully clarify exactly what you mean by this.) – cfr Dec 02 '15 at 03:56
  • See http://tex.stackexchange.com/questions/271170/third-level-organizational-chart-using-latex-tikz, for example. – cfr Dec 02 '15 at 04:01

1 Answers1

3

With stolen code from TeXexamples ... the following can serve as starting point for your effort to make desired tree:

\documentclass{article}
    \usepackage{tikz}
\usetikzlibrary{shadows,trees}

    \begin{document}
    \begin{tikzpicture}[
      every node/.style = {draw, rounded corners=3pt, semithick, drop shadow},
            ROOT/.style = {top color=green!60!blue, bottom color=blue!60!green,
                             inner sep=2mm, text=white, font=\bfseries},
              L1/.style = {fill=blue!20},
              L2/.style = {fill=orange!30},
              L3/.style = {fill=green!30, grow=down, xshift=1em, anchor=west, 
      edge from parent path={(\tikzparentnode.south) |- (\tikzchildnode.west)}},
edge from parent/.style = {draw, thick},
              LD/.style = {level distance=#1ex},
             LD1/.style = {level distance=6ex},
             LD2/.style = {level distance=12ex},
             LD3/.style = {level distance=18ex},
         level 1/.style = {sibling distance=32mm}
                        ]
    % Parents
\node[ROOT] {root}
    [edge from parent fork down]
    child{node[L2] {AAA AAA AAA}
      child[L3,LD1]   {node[L3]   {A1}}
      child[L3,LD2]  {node[L3]   {A2}}
      child[L3,LD3]   {node[L3]   {A3}}
            }
    child{node[L2] {BB  BB BB BB}
      child[L3,LD1]  {node[L3]   {B1}}
      child[L3,LD2]  {node[L3]   {B2}}
            }
    child {node[L2] {C CC CCC}
      child[L3,LD1] {node[L3]   {C1}}
      child[L3,LD2] {node[L3]   {C2 C2 C2}
          child[L3,LD1] {node[L3,fill=red!30]   {C1}}
          child[L3,LD2] {node[L3,fill=red!30]   {C2}} 
                        }     
      child[L3,LD=30]  {node[L3]   {C2 C2 C2}}
            };
\end{tikzpicture}
    \end{document}

enter image description here

Real text in nodes, and number of nodes should not be too difficult to change and add.

Zarko
  • 296,517