\begin{tikzpicture}
 \pie[square]{40/A, 30/B, 20/C, 10/D}
\end{tikzpicture}