diff --git a/wahlergebnis.tex b/wahlergebnis.tex index ea0a6f5e6a9470463ba3c549d89fadb4985051ce..792f046d406a7d6600fcdcab305ee23765e6f98e 100644 --- a/wahlergebnis.tex +++ b/wahlergebnis.tex @@ -39,12 +39,19 @@ \definecolor{percentcolor}{HTML}{EEEEEC} \definecolor{linecolor}{HTML}{2E3436} + + \newcommand{\piechart}[1]{ -\begin{tikzpicture}[scale=1.8] +\begin{tikzpicture}[segment/.style={ + rounded corners=.2cm, + draw = boxbg, + line width=.1cm, + }, + ] \pgfmathsetmacro{\curarc}{180} % starting angle - \pgfmathsetmacro{\radius}{3} + \pgfmathsetmacro{\radius}{5.4} \useasboundingbox (-\radius cm,+\radius cm) rectangle (+\radius cm,0); - \pgfmathsetmacro{\smallradius}{.7} + \pgfmathsetmacro{\smallradius}{1.26} \foreach \percent/\seats/\name/\curcolor [remember=\curarc] in { #1} { @@ -66,9 +73,16 @@ -- (\endarc:\radius cm) arc (\endarc:\startarc:\radius cm) -- cycle} - \draw[fill=\curcolor, draw=boxbg,rounded corners=.2cm,line width=.1cm] - \mypath - node [anchor=center,rotate=\labelarc, shape border rotate=0] + % \node { + %\begin{tikzfadingfrompicture}[name=fade right,scale=0.5] + %\fill[fill=transparent] (-\radius cm,+\radius cm) rectangle (+\radius cm,0); + %\draw[fill=white] \mypath; + %\draw[segment,draw=black,line width = 2mm] \mypath; + %\end{tikzfadingfrompicture} + %}; + %\fill[path fading=fade right,fill=\curcolor] (-\radius cm,+\radius cm) rectangle (+\radius cm,0); + \draw[segment,fill=\curcolor] \mypath; + \node [anchor=center,rotate=\labelarc, shape border rotate=0] at (\middle:0.5*\radius+0.5*\smallradius) {\sf{\color{percentcolor} \seats\ \ifthenelse{\equal{\seats}{1}}{Sitz}{Sitze}}};