I have a tikzpicture with several nodes. Inside each node I am drawing a tikzpicture with something. Some nodes have charts, others have flowcharts etc.
Everything seems fine. The problem is when I put the two nodes below which have pie charts inside them. Why are the second pie chart's slice labels displaced? How can I fix that?
If I change the order of the charts, the second always displaces its labels.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{pgfplots}
\usepackage{tikz}
\usepackage{pgf-pie}
\usetikzlibrary{shapes.geometric, positioning, backgrounds}
\begin{document}
\begin{figure}[htb]
\centering
\caption{Example of charts 1, 3, 5, and 7 - Total cost per case, activity, resource and time}
\begin{tikzpicture}[align=center,node distance=.3cm and .3cm, framed]
\node (c1) [label=below:Total cost per activity] {\scalebox{.9}{
\begin{tikzpicture}
\pie[sum = auto, radius=2.2, color={gray!10,gray!20,gray!30,gray!40,gray!50,gray!60,gray!70,gray!80}
]{300/a,2997/b,2400/c,900/d,1800/e,2100/f,600/g,600/h}
\end{tikzpicture}
}};
\node (c2) [label=below:Total cost per resource, right=of c1] {\scalebox{.9}{
\begin{tikzpicture}
\pie[radius=1.8, sum = auto, color={gray!10,gray!20,gray!30,gray!40,gray!50}
]{1050/Pete,1399/Sue,2100/Mike,3900/Sara,1250/Ellen}
\end{tikzpicture}
}};
\end{tikzpicture}
\end{figure}
\end{document}


\fboxaround the tabular for the frame, among other options. – Marijn Jun 16 '21 at 14:48/.picinstead. – Henri Menke Jun 16 '21 at 16:05