From e639dc930549dea6764c1e09efb42976089038a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20Wi=C3=9Fmann?= <edu@thorsten-wissmann.de> Date: Wed, 15 Jun 2016 14:24:56 +0200 Subject: [PATCH] Get rid of scaling --- wahlergebnis.tex | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/wahlergebnis.tex b/wahlergebnis.tex index ea0a6f5..792f046 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}}}; -- GitLab