I drawed a custom pie chart with plain tikz using a combination of arcs and triangles. All fits well so far. One major remaining problem is that there are thin white lines appearing at the intersection of the triangles with the filled out arcs (see for example in piece 28.8%). Does anyone knows how to fix this? And if anyone has some suggestions as to how to automate the calculation of the angles in each of the following pieces I would appretiate some advice to that too.
MWE:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
%Style Definitions
\tikzstyle{piece1} = [fill=black!5]
\tikzstyle{piece2} = [fill=black!20]
\tikzstyle{piece3} = [fill=black!35]
\tikzstyle{piece4} = [fill=black!50]
\tikzstyle{piece5} = [fill=black!65]
\tikzstyle{line} = [line width=0.4pt,line cap=round,shorten >=0.2pt]
\tikzstyle{line2} = [line width=0.2pt]
\tikzstyle{percent} = [font=\footnotesize]
%Piece 59,8%
\fill[piece1] (0,0) ++( 90 : 3 )coordinate(l1) arc (90:-90:3 )coordinate(r1)coordinate[pos=0.65](b2);
\fill[piece1] (r1) -- (0,0) -- (l1);
\fill[piece1] (0,0) ++( -90 : 3 )coordinate(l2) arc (-90:-125.28:3 )coordinate(r2) ;
\fill[piece1] (r2) -- (0,0) -- (l2);
%Piece 28,8%
\fill[piece2] (0,0) ++( -125.28 : 3 )coordinate(l3) arc (-125.28:-228.96:3 )coordinate(r3) coordinate[pos=0.5](b3);
\fill[piece2] (r3) -- (0,0) -- (l3);
%Piece 9,2%
\fill[piece3] (0,0) ++( -228.96 : 3 )coordinate(l4) arc (-228.96:-262.08:3 )coordinate(r4) coordinate[pos=0.5](b4);
\fill[piece3] (r4) -- (0,0) -- (l4);
%Piece 1,3%
\fill[piece4] (0,0) ++( -262.08 : 3 )coordinate(l5) arc (-262.08:-266.76:3 )coordinate(r5) coordinate[pos=0.5](b5);
\fill[piece4] (r5) -- (0,0) -- (l5);
%Piece 1%
\fill[piece5] (0,0) ++( -266.76 : 3 )coordinate(l6) arc (-266.76:-270:3 )coordinate(r6) coordinate[pos=0.5](b6);
\fill[piece5] (r6) -- (0,0) -- (l6);
%Pie Lines
\draw[line] (0,0) -- (r2);
\draw[line] (0,0) -- (r3);
\draw[line] (0,0) -- (r4);
\draw[line] (0,0) -- (r5);
\draw[line] (0,0) -- (r6);
\draw[line] (0,0) circle (3);
% Percentages
\path (0,0) -- coordinate[pos=0.65](b2m)(b2);
\node[percent] at (b2m) {59,8\%};
\path (0,0) -- coordinate[pos=0.65](b3m)(b3);
\node[percent] at (b3m) {28,8\%};
\path (0,0) -- coordinate[pos=0.65](b4m)(b4);
\node[percent] at (b4m) {9,2\%};
\draw[line2] (b5) -- ++(0,0.25) -- ++(-0.25,0.25) node[percent,anchor=south east]{1,3\%};
\draw[line2] (b6) -- ++(0,0.25) -- ++(0.25,0.25) node[percent,anchor=south west]{1\%};
%Legend
\node[piece3,draw=black,line width=0.2,rectangle,minimum width=0.25cm,minimum height=0.25cm,label={right:Fachholschulreife}](leg1) at (4,0) {};
\node[piece2,draw=black,line width=0.2,rectangle,minimum width=0.25cm,minimum height=0.25cm,label={right:Fachholschulreife},above=9pt of leg1.north] (leg2){};
\node[piece1,draw=black,line width=0.2,rectangle,minimum width=0.25cm,minimum height=0.25cm,label={right:Fachholschulreife},above=9pt of leg2.north] {};
\node[piece4,draw=black,line width=0.2,rectangle,minimum width=0.25cm,minimum height=0.25cm,label={right:Fachholschulreife},below=9pt of leg1.south] (leg4){};
\node[piece5,draw=black,line width=0.2,rectangle,minimum width=0.25cm,minimum height=0.25cm,label={right:Fachholschulreife},below=9pt of leg4.south] {};
\end{tikzpicture}
\end{document}
