I am trying to make a tree view with TikZ of the different hazards modes that exist with lithium-ion batteries. Now I have the problem that some nodes have a text with two lines and then it doesn't look nice at all because in this case the distances are changed and some are moving up. What i would like is that every node is align with its north edge and to have a bigger gap between the bigger nodes to get rid of the impression of being squeeyed.
Also another issue is the baseline, because even if i add anchor=base it does not work (in the minimum example I removed the code for it).
Does someone know how i can solve this issue?
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage[european]{circuitikz}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,positioning,shadows,trees}
\usepackage{tikz-qtree}
\begin{document}
\begin{figure}[ht]
\centering
\tikzset{
basic/.style = {white, text=black, draw, text width=0.95\textwidth, font=\sffamily, rectangle},
root/.style = {white, text=white, basic, rounded corners=2pt, thin, align=center, fill=blue!60},
level 2/.style = {white, text=black, basic, rounded corners=2pt, thin, align=center, fill=blue!30, text width=2.8cm},
level 3/.style = {white, text=black, basic, thin, align=left, fill=blue!10, text width=6.5em, fill=blue!10}
}
\begin{tikzpicture}[
level 1/.style={sibling distance=37mm},
]
% root of the the initial tree, level 1
\node[root, text=white, minimum height=1cm] {Hazard Modes}
% The first level, as children of the initial tree
child[white, level distance=10mm, minimum height=0.7cm] {node[level 2] (c1) {Electrical}}
child[white, level distance=10mm, minimum height=0.7cm] {node[level 2] (c2) {Thermal}}
child[white, level distance=10mm, minimum height=0.7cm] {node[level 2] (c3) {Mechnical}}
child[white, level distance=10mm, minimum height=0.7cm] {node[level 2] (c4) {System}};
% The second level, relatively positioned nodes
\begin{scope}[every node/.style={level 3}]
\node [below of = c1] (c11) {Short-Circuit};
\node [below of = c11] (c12) {Overcharge};
\node [below of = c12] (c13) {Soft Short};
\node [below of = c2] (c21) {Fire};
\node [below of = c21] (c22) {Elevated Temperature};
\node [below of = c3] (c31) {Crush};
\node [below of = c31] (c32) {Nail Penetration};
\node [below of = c32] (c33) {Drop};
\node [below of = c4] (c41) {Contactor Fails Closed};
\node [below of = c41] (c42) {Loss of HV Continuity};
\node [below of = c42] (c43) {Chassis Fault};
\end{scope}
\end{tikzpicture}
\caption{Arrangement of the different hazard modes to assign hazard levels.}
\label{fig:SafetyHazardModes}
\end{figure}
\end{document}
minimum height
key, you don't need to align anything.