Start a new line in label using pgf-pie

I'm using pgf-pie. It is not a standard package. I found it on google code. As its name, it is used to create pie chart.

\begin{figure}[htp]
\centering
\begin{tikzpicture}[scale=0.9]
explode=0.2,
color={blue!70,cyan!70,red!70,orange!50}]{65/Amplificatori di potenza, 10/Elaborazione del segnale, 17.5/Sistemi di raffreddamento, 7.5/Alimentazione}
\end{tikzpicture}
\end{figure}


I would start a new line in label. In latex the command is \\ but it doesn't work. Any idea?

-
\\  does not work in TikZ nodes by default too. You need to supply the PGF key align=center to those labels somehow. –  Qrrbrbirlbel Jan 4 '13 at 18:37
Maybe you be more specific? –  Mazzy Jan 4 '13 at 18:38

The \\ macro doesn’t work normally in a TikZ node at all unless a text width or an alignment is set.

As you specified that the texts are in fact text=pin you will need to use

/tikz/every pin/.style={align=center},


The reason that the /tikz/ tree must be prepended is that the first (optional) argument of \pie is forwarded to \pgfkeys and not \tikzset.

Code

\documentclass[tikz]{standalone}
\usepackage{pgf-pie}
\begin{document}
\begin{tikzpicture}[scale=0.9]
\pie[
/tikz/every pin/.style={align=center},
text=pin,
rotate=240,
explode=0.2,
color={blue!70,cyan!70,red!70,orange!50},
]
{
65/Amplificatori di\\potenza,
10/Elaborazione\\del segnale,
17.5/Sistemi di\\raffreddamento,
7.5/Alimentazione
}
\end{tikzpicture}
\end{document}


Output

-

As in @Qrrbrbirlbel's comment, you can't break lines by default in TikZ nodes. In this answer it is also said, you will have to set the parameters of the node text to be able to break a line. The \pie command, however, won't like that, so you need to specify it globally for the whole tikzpicture:

\documentclass{article}

\usepackage{tikz}
\usepackage{pgf-pie}

\begin{document}
\begin{figure}[htp]
\centering
\begin{tikzpicture}[scale=0.9,align=center]