I have three pie charts for which I only want to create one legend. For this purpose, only the third diagram contains a legend. But my third diagram contains only one value. To create the legend, I have zeroed all the values that appear in the three pie charts in the third chart. The result then looks similar to the first figure.
\documentclass{article}
\usepackage{pgf-pie}
\begin{document}
\begin{tikzpicture}
\pie[pos={0,0},radius=1.5,sum=auto,text=]{22/Apple pie ,5/Cheesecake}
\pie[pos={4,0},radius=1.5,sum=auto,text=]{17/Apple pie,9/Cheesecake,1/Raspberry pie}
\pie[pos={8,0},radius=1.5,sum=auto,text=legend] {27/Apple pie,0/Cheesecake,0/Raspberry pie}
\end{tikzpicture}
\end{document}
Is it possible to display only values greater than 0 in the pie chart? I would like to get a result similar to the one in the second figure. I would prefer not to change the order of the diagrams.