1

How do I manually adjust/define the position of each legend when using the "wheelchart" package, I read somewhere that it is not possible to adjust in the "Wheelchart" package. The legends overlap when the value is low. Any idea or workaround is much appreciated.

enter image description here

\documentclass[border=6pt]{standalone}
\usepackage{wheelchart} 
\usetikzlibrary{decorations.markings}

\begin{document} \begin{tikzpicture} \wheelchart

[data=\WCvarC: \WCperc, lines=0.5, lines ext=0.5, lines sep=-0.2, lines style={ postaction=decorate, decoration={ markings, mark=at position 0 with { \fill (0,0) circle[radius=0.1]; } } }, perc precision=1, radius={1.8}{2.2} ]

{ 55.55/green/Option A, 6.55/red/Option B, 29.59/blue/Option C, 3.59/orange/Option D, 4.73/purple/Option E }

\end{tikzpicture} \end{document}

IamK
  • 33

1 Answers1

2

This can be changed with the keys of the wheelchart package (which I wrote).

A solution similar to the one in https://tex.stackexchange.com/a/703206 can be used.

To adjust the length of the line in the fifth slice, the key lines{5}=1 is used.

Also, the empty line between \wheelchart and the next [ is removed. And also between the closing ] and the next {.

enter image description here

\documentclass[border=6pt]{standalone}
\usepackage{wheelchart}
\usetikzlibrary{decorations.markings}
\begin{document}
\begin{tikzpicture}
\wheelchart[
  data=\WCvarC: \WCperc,
  lines=0.5,
  lines{5}=1,
  lines ext=0.5,
  lines sep=-0.2,
  lines style={
    postaction=decorate,
    decoration={
      markings,
      mark=at position 0 with {
        \fill (0,0) circle[radius=0.1];
      }
    }
  },
  perc precision=1,
  radius={1.8}{2.2}
]{%
  55.55/green/Option A,
  6.55/red/Option B,
  29.59/blue/Option C,
  3.59/orange/Option D,
  4.73/purple/Option E%
}
\end{tikzpicture}
\end{document}
matexmatics
  • 4,819