[Tex/LaTex] what is the best way to draw diagram in latex (like family tree)

diagramsdrawpdftextikz-pgf

What is the easiest way to draw a tree like this. I am using pdflatex.

enter image description here

I tried with this, but it got missed up taken from source, i am having many issues such as the height of the fork is too much (how can i make it dynamic). (2) how can i control the horizontal spacing among children to avoid overlapping as i got down there.

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{trees}
\usetikzlibrary{shadings}

\begin{document}

\begin{figure}[!htb]


\begin{tikzpicture}[
every node/.style={draw=black,thin, minimum height=1.5em},
    supervisor/.style={%
    align=center,
        edge from parent fork down,
        level distance=0.1cm,
        align=center,},
    area/.style={%
        text centered, text width=3cm,
        level distance=4cm,
        fill=gray!10,draw,
        -latex},
    method/.style={%
   thick,anchor=west, minimum height=2.5em,
        grow=down, xshift=-1.1cm, % Horizontal position of the child node
        text centered, text width=3cm,
        edge from parent path={(\tikzparentnode.205) |- (\tikzchildnode.west)},draw, -latex},
    level1/.style ={level distance=1.5cm},
    level2/.style ={level distance=3cm},
    level3/.style ={level distance=4.5cm},
    level4/.style ={level distance=6cm},
    level5/.style ={level distance=7.5cm},
    level 1/.style={sibling distance=4cm},
    level 1/.append style={level distance=4.5cm},
]
%   \draw[help lines] (0,0) grid (4,3);

    % Supervisor
    \node[anchor=south,supervisor,align=center]{Base}
    [edge from parent fork down]

    % Teammate and Subordinates
    child{
        node [area] {Attributable \\ Measurements}  
        [edge from parent fork down]  
             child{ 
             node [area] {Attributable \\ Measurements}
                    }
            child{  
                             node [area] {Attributable \\ Measurements}
                                    }
      }
    %
    child{node [area] {Teammate2\\Position2\\Location2}
        child[method,level1] {node {Subordinate1}}
        child[method,level2] {node {Subordinate2}}
        child[method,level3] {node {Third\\Teammate}}
        child[method,level4] {node {Longtext-\\area}}}; 
%\shade[shading=Mandelbrot set] (0,0) rectangle (5,5);
\end{tikzpicture}
\caption{This is an org chart}
\end{figure}
\end{document}

enter image description here
Thank you.

Best Answer

If your tree is like a family tree, you may consider to use a family tree drawing package like genealogytree.

There is no option to switch the growing direction, but all distances are computed automatically. The original picture could be drawn like this:

enter image description here

The code is the following:

\documentclass{article}
\usepackage{geometry}
\usepackage[templates]{genealogytree}
\usepackage{lmodern}

\begin{document}
\begin{figure}
\noindent\resizebox{\textwidth}{!}{
\begin{genealogypicture}[
  template=signpost,
  level distance=10mm,
  level size=8mm,
  node size=15mm,
  box={colback=white,sharp corners,fontupper=\sffamily},
  mark/.style={box={colback=blue!20}},
  edges={foreground={line width=1pt,red,-LaTeX,},background={line width=2pt,white}}
  ]
child{
  g{root}
  child{ g{l}
    child{ g{lx1}
      child{ g[mark]{lx11}
        c[mark]{lx111} c[mark]{lx112}
      }
      c[mark]{lx12} c[mark]{lx13} c[mark]{lx14}
    }
    child{ g{ll1}
      child{ g{ll11}
        c[mark]{ll111}
      }
      child{ g{ll12}
        c[mark]{ll121} c[mark]{ll122}
      }
    }
  }
  child{ g{r}
    child{ g{r1}
      child{ g{r11}
        c[mark]{r111} c[mark]{r112}
      }
      child{ g{r12}
        c[mark]{r121} c[mark]{r122}
      }
    }
  }
}
\end{genealogypicture}
}
\caption{This is an org chart}
\end{figure}
\end{document}