Aligning/Justifying a decision tree

qtreetikz-trees

I want to make a diagram that looks exactly like this one, without the red border. I am using the qtree package to get a similar result, but I get two problems. Firstly, I am unable to make a right-align on the leaves of the tree
Secondly, the edges/lines sometimes overlap with the words in the nodes.

enter image description here
enter image description here
Below is the code i used to generate the tikz image

\usepackage{qtree}
\usepackage{tikz}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\tikzset{grow'=right} % make trees grow from left to right
\tikzset{every tree node/.style={anchor=base west}} % align nodes of the tree to the left (west)
\Tree [.S [.NP LaTeX ] [.VP [.V is ] [.NP fun ] ] ]
\\
\\
\clearpage
% In the document:
\begin{tikzpicture}
    \small
    \node (is-root) {Heildarskaði}
        [sibling distance=6.5cm]
        child {
            [sibling distance=3.3cm]
            child { 
                child {node {Fyrir notendur}
                child {
                    [sibling distance=1cm]
                    child { node {Líkamlegur} 
                        child {
                            child { 
                                [sibling distance=0.5cm]
                                child {node {Bein dánartíðni vímuefna}}
                            }
                        }
                        child {
                            child { 
                                child {node {Tengd dánartíðni vímuefna}}
                            }
                        }
                        child {
                            child { 
                                child {node {Beinn skaði vímuefna}}
                            }
                        }
                        child {
                            child { 
                                child {node {Tengdur skaði vímuefna}}}
                            }
                        }
                }
                child {
                    [sibling distance=1cm]
                    child { node {Sálrænn} 
                        child {
                            child { 
                                [sibling distance=0.5cm]
                                child {node {Fíkn}}
                            }
                        }
                        child {
                            child { 
                                child {node {Beinn skaði vímuefna á geðheilsu}}
                            }
                        }
                        child {
                            child { 
                                child {node {Óbeinn skaði vímuefna á geðheilsu}}
                            }
                        }
                    }
                }
                child {
                    [sibling distance=1cm]
                    child { node {Samfélagslegur} 
                        child {
                            child { 
                                [sibling distance=0.5cm]
                                child {node {Tap á efnislegum þörfum}}
                            }
                        }
                        child {
                            child { 
                                child {node{Tap á félagslegum þörfum}}
                            }
                        }
                    }
                } 
                }
            }
        }
        child {
            [sibling distance=3.5cm]
            child { 
                child {node { Fyrir aðra}
                    child {
                    [sibling distance=1cm]
                    child { node {Líkamlegur og sálrænn} 
                        child {
                            child { 
                                [sibling distance=0.5cm]
                                child {node {Skaði}}
                            }
                        }
                    }
                }
                child {
                    [sibling distance=1cm]
                    child { node {Samfélagslegur} 
                        child {
                            child { 
                                [sibling distance=0.5cm]
                                child {node {Glæpatíðni}}
                            }
                        }
                        child {
                            child { 
                                child {node {Umhverfislegur skaði}}
                            }
                        }
                        child {
                            child { 
                                child {node {Neikvæð áhrif á fjölskyldu}}
                            }
                        }
                        child {
                            child { 
                                child {node {Alþjóðlegur skaði}}}
                            }
                        child {
                            child { 
                                child {node {Efnahagslegur kostnaður}}
                            }
                        }
                        child {
                            child { 
                                child {node {Þjóðfélagslegur skaði}}}
                            }
                    }
                }
                }
            }
                %child[missing]
        };
    \path (is-root) +(0,-2.5\tikzleveldistance)
\end{tikzpicture}

Best Answer

A small variation of nice @Ross answer (+1). Differences are marked by % <---:

\documentclass[border=3.141592]{standalone}
\usepackage[edges]{forest}

\begin{document}
\begin{forest}
  for tree={
    grow'=east,
    anchor=east,   % <---
    edge path = {
           \noexpand\path[\forestoption{edge}]
           (!u.parent anchor) -- (!u.east |- .child anchor) --  (.child anchor) % <---
           \forestoption{edge label};
                },
  tier/.option = level, % <---
    }
  [Heildarskaði
     [Fyrir notendur
       [Líkamlegur
         [Bein dánartíðni vímuefna]
         [Tengd dánartíðni vímuefna]
         [Beinn skaði vímuefna]
         [Tengdur skaði vímuefna]
         [,phantom] % <---
       ]
       [Sálrænn,before computing xy={s/.average={s}{siblings}} % <---
         [Fíkn]
         [Beinn skaði vímuefna á geðheilsu]
         [Óbeinn skaði vímuefna á geðheilsu]
       ]
       [Samfélagslegur
         [Tap á efnislegum þörfum]
         [Tap á félagslegum þörfum]
       ]
     ]
     [Fyrir aðra
       [Líkamlegur og sálrænn
         [Líkamlegur og sálrænn]
       ]
       [Samfélagslegur
         [Glæpatíðni]
         [Umhverfislegur skaði]
         [Neikvæð áhrif á fjölskyldu]
         [Alþjóðlegur skaði]
         [Efnahagslegur kostnaður]
         [Þjóðfélagslegur skaði]
       ]
     ]
   ]
\end{forest}
\end{document}

after compiling with XeLaTeX or LuaLaTeX you will get:

enter image description here

Related Question