I want to change the line color of a pie chart in LaTeX so that the line color of the slices take the fill color.
Mini example:
\usepackage{pgf-pie}
\begin{document}
\begin{tikzpicture}
\pie[color={red, blue, yellow, green},
sum=auto, after number=,text=pin,
every only number node/.style={text=black}]{10/A,20/B,30/C,10/D}
\end{tikzpicture}
\end{document}
This has a black line color. How can I change it to the fill color of the slice?
Best Answer
You have to define a style for the lines (e.g.
lines/.style={draw=none}
) and then set thestyle
key in\pie
tolines
:Because of how the
style
key is handled internally, you have to define thelines
style outside of the argument for\pie
and you cannot put the style settings directly in the value ofstyle
.