texlive[64373] Master: wheelchart (13sep22)

commits+karl at tug.org commits+karl at tug.org
Tue Sep 13 22:41:53 CEST 2022


Revision: 64373
          http://tug.org/svn/texlive?view=revision&revision=64373
Author:   karl
Date:     2022-09-13 22:41:53 +0200 (Tue, 13 Sep 2022)
Log Message:
-----------
wheelchart (13sep22)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/wheelchart/
    trunk/Master/texmf-dist/doc/latex/wheelchart/README.md
    trunk/Master/texmf-dist/doc/latex/wheelchart/wheelchart.pdf
    trunk/Master/texmf-dist/doc/latex/wheelchart/wheelchart.tex
    trunk/Master/texmf-dist/tex/latex/wheelchart/
    trunk/Master/texmf-dist/tex/latex/wheelchart/wheelchart.sty
    trunk/Master/tlpkg/tlpsrc/wheelchart.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/wheelchart/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/wheelchart/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/wheelchart/README.md	2022-09-13 20:41:53 UTC (rev 64373)
@@ -0,0 +1,25 @@
+# `wheelchart`
+
+## Draw wheelcharts with TikZ
+
+Version 1.0 (2022/09/11)
+
+This package is based on the package [TikZ](https://ctan.org/pkg/pgf) and can be used to draw wheelcharts with TikZ. It provides several options to customize the wheelcharts.
+
+%% README.md
+%% Copyright 2022 Matthias Floré
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+%   http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+% 
+% The Current Maintainer of this work is Matthias Floré.
+%
+% This work consists of the files wheelchart.pdf, wheelchart.sty,
+% wheelchart.tex and README.md.
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/latex/wheelchart/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/wheelchart/wheelchart.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/wheelchart/wheelchart.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/wheelchart/wheelchart.pdf	2022-09-13 20:40:27 UTC (rev 64372)
+++ trunk/Master/texmf-dist/doc/latex/wheelchart/wheelchart.pdf	2022-09-13 20:41:53 UTC (rev 64373)

Property changes on: trunk/Master/texmf-dist/doc/latex/wheelchart/wheelchart.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/wheelchart/wheelchart.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/wheelchart/wheelchart.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/wheelchart/wheelchart.tex	2022-09-13 20:41:53 UTC (rev 64373)
@@ -0,0 +1,1279 @@
+%% wheelchart.tex
+%% Copyright 2022 Matthias Floré
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+%   http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+% 
+% The Current Maintainer of this work is Matthias Floré.
+%
+% This work consists of the files wheelchart.pdf, wheelchart.sty,
+% wheelchart.tex and README.md.
+\documentclass[a4paper,english,dvipsnames]{ltxdoc}
+\usepackage[english]{babel}
+\usepackage{graphicx}
+\usepackage[a4paper,left=2.25cm,right=2.25cm,top=2.5cm,bottom=2.5cm,nohead]{geometry}
+\usepackage{parskip}
+\usepackage[T1]{fontenc}
+\usepackage[utf8]{inputenc}
+\usepackage{mathtools}
+\usepackage{amssymb}
+\usepackage{interval}
+\allowdisplaybreaks
+\usepackage{siunitx}
+\usepackage{etoolbox}
+\usepackage{listofitems}
+\usepackage{wheelchart}
+\usetikzlibrary{decorations.markings,patterns}
+\input{pgfmanual-en-macros.tex}
+\usepackage[page]{totalcount}
+\usepackage{fancyhdr}
+\pagestyle{fancy}
+\renewcommand{\headrulewidth}{0pt}
+\cfoot{\iftotalpages\begin{tikzpicture}[scale=0.15]\wheelchart[data={},gap,middle=\thepage,slices style={/utils/exec={\ifnum\thepage=\WCcount\def\WCcolor{Cyan}\else\def\WCcolor{Gray}\fi},\WCcolor},total count={\totalpages-1},value=1]{}\end{tikzpicture}\fi}
+\fancyhead{}
+\usepackage{etoc}
+\def\WCtableofcontents{}
+\etocsetstyle{section}{}{}{\xappto\WCtableofcontents{,\etocthename/\etocthenumber/\etocthepage}}{}
+\etocsettocstyle{\hypersetup{hidelinks}}{}
+\etocglobaldefs
+\usepackage{imakeidx}
+\makeindex[program=makeindex,columns=2,intoc=true]
+\indexsetup{othercode={\thispagestyle{fancy}}}
+%\PassOptionsToPackage{hyphens}{url}
+\usepackage{xurl}
+\usepackage[linktoc=all,pdfstartview=FitH,colorlinks=true,linkcolor=Mahogany,citecolor=ForestGreen,urlcolor=MidnightBlue,bookmarksnumbered=true]{hyperref}
+\hypersetup{pdftitle={The wheelchart package},pdfauthor={Matthias Flor\'e},pdfsubject={Manual},pdfkeywords={wheelchart}}
+\setcounter{tocdepth}{2}
+\setcounter{secnumdepth}{2}
+\title{The \texttt{wheelchart} package\\[12pt]\large Draw wheelcharts with \tikzname}
+\author{Matthias Flor\'e}
+\date{Version 1.0 (2022/09/11)}%\\[12pt]
+\begin{document}
+\maketitle
+\thispagestyle{fancy}
+\begin{abstract}
+\noindent This package is based on the package |tikz| (see \cite{TtTaPGFp}) and can be used to draw wheelcharts with \tikzname. It provides several options to customize the wheelcharts. Other tools for creating wheelcharts or pie charts can be found in \cite{MpMP}, \cite{JhcIparowcltopotPGFm}, \cite{Tumfdb}, \cite{RSVpaaMfp} and \cite{XdPCbupp}.% This is the manual for version .
+\end{abstract}
+\section*{\contentsname}
+\tableofcontents
+\patchcmd{\WCtableofcontents}{,}{}{}{}
+\begin{codeexample}[]
+\begin{tikzpicture}
+\wheelchart[
+    data={%
+\pgfmathsetmacro{\WCcolornumber}{(\WCcount/\WCtotalcount)*100}%
+\ifdefempty{\WCvarB}{\gdef\WChyperlink{section*.3}}{\gdef\WChyperlink{section.\WCcount}}%
+\hyperlink{\WChyperlink}{%
+\textbf{\textcolor{PineGreen!\WCcolornumber}{\Large\ifdefempty{\WCvarB}{}{\WCvarB{} }\WCvarA}}}\\%
+\hyperlink{\WChyperlink}{\textcolor{Cyan}{page \WCvarC}}%
+},
+    gap,
+    lines,
+    lines style={Cyan,very thick},
+    middle={\LARGE The\\[10pt]\huge\texttt{wheelchart}\\[10pt]\LARGE package},
+    slices style={
+        /utils/exec={\pgfmathsetmacro{\WCcolornumber}{(\WCcount/\WCtotalcount)*100}},
+        PineGreen!\WCcolornumber,
+        draw=Cyan,
+        very thick
+    },
+    value=1
+]{\WCtableofcontents}
+\end{tikzpicture}
+\end{codeexample}
+\section{Usage}
+The package |wheelchart| can be used by putting the following in the preamble.
+\begin{codeexample}[code only]
+\usepackage{wheelchart}
+\end{codeexample}
+The package |wheelchart| loads the package |tikz| and the \tikzname{} library |calc|.
+
+Many examples in this manual use colors which can be defined by giving |dvipsnames| as an option to |\documentclass|.
+\section{The main macro}
+\begin{command}{\wheelchart\opt{\oarg{options}}\marg{wheelchart data}}
+This command can be placed inside a |tikzpicture| environment. It draws a wheelchart with \meta{wheelchart data}. The \meta{wheelchart data} is a comma separated list. Each item in this list corresponds to one slice of the wheelchart and consists of data separated by a |/|. The precise syntax of the \meta{wheelchart data} will be explained below. The \meta{options} can be given with the keys described in Section \ref{Keys}.
+\begin{command}{\exampleforthismanual}
+To simplify the creation of examples in this manual, we define the \meta{wheelchart data} below.
+\begin{codeexample}[]
+\gdef\exampleforthismanual{%
+14/Apricot/Apricot/{A, B, C, E, K}/{north east lines}/0/0/Gray,
+40/LimeGreen/Lime/{B, C}/grid/0/15/Black,
+20/Melon/Melon/{A, C}//0.5/0/none,
+16/OliveGreen/Olive/{A, B, E, K}/dots/0/0/none,
+28/Peach/Peach/{A, B, C, E, K}/{fivepointed stars}/0/0/Lavender,
+32/Plum/Plum/{A, B, C, E, K}/bricks/0/{-15}/none,
+50/WildStrawberry/Strawberry/{B, C, E, K}//1/0/DarkOrchid%
+}
+\end{codeexample}%pattern crosshatch,checkerboard
+\end{command}
+The default wheelchart with these data is shown below.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart{\exampleforthismanual}
+\end{tikzpicture}
+\end{codeexample}
+\end{command}
+\section{Additional macros}
+\begin{command}{\WCcount}
+This macro gives the current number of the slice in the \meta{wheelchart data}.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    inner data=\WCcount
+]{\exampleforthismanual}
+\end{tikzpicture}
+\end{codeexample}
+\end{command}
+\begin{command}{\WCdataangle}
+This macro stores the sum of the value of the key |data angle shift| (taking into account the key |counterclockwise|) and the macro |\WCmidangle| modulo $360$.
+\end{command}
+\begin{command}{\WCmidangle}
+This macro gives the angle in degrees modulo $360$ of the middle of the current slice.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    data angle shift=\WCvarG,
+    data style={
+        rotate=\WCdataangle,
+        draw=Magenta,
+        fill=GreenYellow,
+        anchor=west,
+        text=Gray
+    }
+]{\exampleforthismanual}
+\wheelchart[
+    data={},
+    inner data={%
+        \textbackslash WCmidangle%
+    },
+    inner data style={
+        rotate=\WCmidangle,
+        font=\ttfamily
+    },
+    slices style={fill=none}
+]{\exampleforthismanual}
+\end{tikzpicture}
+\end{codeexample}
+\end{command}
+\begin{command}{\WCperc}
+This macro displays |\WCpercentage| rounded up to the number of decimals determined by the key |perc precision| followed by a \unit{\percent} symbol.
+
+If the package |siunitx| is loaded then the following code is used. The package |siunitx| can be loaded before or after the package |wheelchart|.
+\begin{codeexample}[code only]
+\qty[round-mode=places,
+     round-precision=\pgfkeysvalueof{/wheelchart/perc precision}]{\WCpercentage}{\percent}
+\end{codeexample}
+If the package |siunitx| is not loaded then the following code is used.
+\begin{codeexample}[code only]
+\WCpercentagerounded\,\%
+\end{codeexample}
+\end{command}
+\begin{command}{\WCpercentage}
+This macro gives the percentage of the current slice where the total is computed with the values of the key |value|. Note that rounding errors can occur.
+\begin{codeexample}[]
+\begin{tikzpicture}
+\wheelchart[
+    data={\WCvarC\\\WCperc},
+    slices style={
+        /utils/exec=\pgfmathsetmacro{\WCcolornumber}{4*\WCpercentage},
+        \WCvarB!\WCcolornumber
+    }
+]{\exampleforthismanual}
+\end{tikzpicture}
+\end{codeexample}
+\end{command}
+\begin{command}{\WCpercentagerounded}
+This macro displays |\WCpercentage| rounded up to the number of decimals determined by the key |perc precision|.
+\end{command}
+\begin{command}{\WCtotalcount}
+This macro gives the total number of slices.
+\end{command}
+\begin{command}{\WCtotalnum}
+This macro gives the sum of all values of the key |value|.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    data={\WCvarC: \WCvarA},
+    middle={%
+        \textbf{\huge Fruit}\\%
+        \WCtotalcount{} species\\%
+        \pgfmathprintnumber{\WCtotalnum}
+        pieces%
+    }
+]{\exampleforthismanual}
+\end{tikzpicture}
+\end{codeexample}
+\end{command}
+\begin{command}{\WCvarA}
+\end{command}
+\begin{command}{\WCvarB}
+\end{command}
+\begin{command}{\WCvarC}
+\end{command}
+\begin{command}{\WCvarD}
+\end{command}
+\begin{command}{\WCvarE}
+\end{command}
+\begin{command}{\WCvarF}
+\end{command}
+\begin{command}{\WCvarG}
+\end{command}
+\begin{command}{\WCvarH}
+\end{command}
+\begin{command}{\WCvarI}
+\end{command}
+\begin{command}{\WCvarJ}
+\end{command}
+\begin{command}{\WCvarK}
+\end{command}
+\begin{command}{\WCvarL}
+\end{command}
+\begin{command}{\WCvarM}
+\end{command}
+\begin{command}{\WCvarN}
+\end{command}
+\begin{command}{\WCvarO}
+\end{command}
+\begin{command}{\WCvarP}
+\end{command}
+\begin{command}{\WCvarQ}
+\end{command}
+\begin{command}{\WCvarR}
+\end{command}
+\begin{command}{\WCvarS}
+\end{command}
+\begin{command}{\WCvarT}
+\end{command}
+\begin{command}{\WCvarU}
+\end{command}
+\begin{command}{\WCvarV}
+\end{command}
+\begin{command}{\WCvarW}
+\end{command}
+\begin{command}{\WCvarX}
+\end{command}
+\begin{command}{\WCvarY}
+\end{command}
+\begin{command}{\WCvarZ}
+The \meta{wheelchart data} in the command |\wheelchart| is a comma separated list. Each item in this list corresponds to one slice of the wheelchart and consists of data separated by a |/|. These individual data are interpreted as |\WCvarA/\WCvarB/\WCvarC/...| and can be accessed within the \meta{options} of the command |\wheelchart| by the macros |\WCvarA| till |\WCvarZ| except within the keys |at|, |caption|, |caption left|, |caption left style|, |caption style|, |contour|, |counterclockwise|, |expand list|, |middle fill|, |name|, |start angle|, |start half|, |title|, |title left|, |title left style|, |title style|, |total angle| and |total count|. Thus up to 26 data can be given to each slice of the wheelchart.
+
+Initially, only |\WCvarA|, |\WCvarB| and |\WCvarC| are used for |value=\WCvarA|, |slices style=\WCvarB| and |data=\WCvarC|.
+\begin{codeexample}[width=10cm,preamble={\usetikzlibrary{patterns}}]
+\begin{tikzpicture}
+\wheelchart[
+    data={},
+    gap,
+    radius={0.5}{3},
+    slices style={\WCvarB!70,draw=\WCvarH,ultra thick,pattern=\WCvarE,pattern color=\WCvarB!70},
+    value=1,
+    wheel data=\WCvarC,
+    %wheel data style={shift={(\WCmidangle:0.5)}},
+    %wheel data pos=0.5
+]{\exampleforthismanual}
+\wheelchart[
+    data={\textcolor{\WCvarB}{Vitamines}\\\WCvarD},
+    gap,
+    radius={3.1}{4},
+    slices arrow={1}{0.2},
+    value=1
+]{\exampleforthismanual}
+\end{tikzpicture}
+\end{codeexample}
+\end{command}
+\section{Keys}\label{Keys}
+The keys in this Section can be given as \meta{options} to the command |\wheelchart|.
+\begin{key}{/wheelchart/anchor xsep=\marg{angle} (initially 5)}
+\end{key}
+\begin{key}{/wheelchart/anchor ysep=\marg{angle} (initially 5)}
+These keys determine the default anchor of the key |data| in the case that |lines ext=0|.
+\begin{table}[ht]
+\centering
+\begin{tabular}{ll}
+ & Anchor of the key |data|\\
+|\WCdataangle| & in the case that |lines ext=0|\\\hline
+$0$ & west\\
+$90$ & south\\
+$180$ & east\\
+$270$ & north\\
+For other angles not in $\{0,90,180,270\}$: & \\
+$[0,\text{|anchor ysep|}]$ & west\\
+$\ointerval{\text{|anchor ysep|}}{90-\text{|anchor xsep|}}$ & south west\\
+$[90-\text{|anchor xsep|},90+\text{|anchor xsep|}]$ & south\\
+$\ointerval{90+\text{|anchor xsep|}}{180-\text{|anchor ysep|}}$ & south east\\
+$[180-\text{|anchor ysep|},180+\text{|anchor ysep|}]$ & east\\
+$\ointerval{180+\text{|anchor ysep|}}{270-\text{|anchor xsep|}}$ & north east\\
+$[270-\text{|anchor xsep|},270+\text{|anchor xsep|}]$ & north\\
+$\ointerval{270+\text{|anchor xsep|}}{360-\text{|anchor ysep|}}$ & north west\\
+$[360-\text{|anchor ysep|},360]$ & west\\
+\end{tabular}
+\caption{Anchor of the key \texttt{data} in the case that \texttt{lines ext=0}.}\label{tableanchorofthekeydatainthecasethatlinesextequaltozero}
+\end{table}
+\begin{codeexample}[width=10cm,preamble={\usetikzlibrary{patterns}}]
+\begin{tikzpicture}
+\wheelchart[
+    inner data={$\WCvarA^{\circ}$},
+    %inner data style={shift={(\WCmidangle:{-0.1})}},
+    inner data sep=0.3,
+    lines,
+    radius={3}{4},
+    slices style={pattern=\WCvarD,pattern color=\WCvarB!70},
+]{%
+    10/Maroon/south/{north east lines},
+    70/TealBlue/{south west}/grid,
+    10/Maroon/west/{north east lines},
+    10/Maroon/west/{north east lines},
+    70/TealBlue/{north west}/grid,
+    10/Maroon/north/{north east lines},
+    10/Maroon/north/{north east lines},
+    70/TealBlue/{north east}/grid,
+    10/Maroon/east/{north east lines},
+    10/Maroon/east/{north east lines},
+    70/TealBlue/{south east}/grid,
+    10/Maroon/south/{north east lines}%
+}
+\end{tikzpicture}
+\end{codeexample}
+\begin{codeexample}[width=10cm,preamble={\usetikzlibrary{patterns}}]
+\begin{tikzpicture}
+\wheelchart[
+    anchor xsep=10,
+    anchor ysep=15,
+    inner data={$\WCvarA^{\circ}$},
+    %inner data style={shift={(\WCmidangle:{-0.1})}},
+    inner data sep=0.3,
+    lines,
+    radius={3}{4},
+    slices style={pattern=\WCvarD,pattern color=\WCvarB!70},
+]{%
+    20/Maroon/south/{north east lines},
+    40/TealBlue/{south west}/grid,
+    30/Maroon/west/{north east lines},
+    30/Maroon/west/{north east lines},
+    40/TealBlue/{north west}/grid,
+    20/Maroon/north/{north east lines},
+    20/Maroon/north/{north east lines},
+    40/TealBlue/{north east}/grid,
+    30/Maroon/east/{north east lines},
+    30/Maroon/east/{north east lines},
+    40/TealBlue/{south east}/grid,
+    20/Maroon/south/{north east lines}%
+}
+\end{tikzpicture}
+\end{codeexample}
+The anchor of the key |data| can also be specified manually by using the key |data style|.
+\begin{codeexample}[width=10cm,preamble={\usetikzlibrary{patterns}}]
+\begin{tikzpicture}
+\wheelchart[
+    data style={anchor=\WCvarC},
+    inner data={$\WCvarA^{\circ}$},
+    %inner data style={shift={(\WCmidangle:{-0.1})}},
+    inner data sep=0.3,
+    lines,
+    radius={3}{4},
+    slices style={pattern=\WCvarD,pattern color=\WCvarB!70},
+]{%
+    10/Maroon/{south west}/{north east lines},
+    70/TealBlue/west/grid,
+    10/Maroon/west/{north east lines},
+    10/Maroon/{north west}/{north east lines},
+    70/TealBlue/north/grid,
+    10/Maroon/north/{north east lines},
+    10/Maroon/{north east}/{north east lines},
+    70/TealBlue/east/grid,
+    10/Maroon/{north east}/{north east lines},
+    10/Maroon/east/{north east lines},
+    70/TealBlue/south/grid,
+    10/Maroon/south/{north east lines}%
+}
+\end{tikzpicture}
+\end{codeexample}
+\end{key}
+\begin{key}{/wheelchart/at=\marg{point} (initially (0,0))}
+This key defines the center of the wheelchart.
+\end{key}
+\begin{key}{/wheelchart/caption=\marg{text}}
+This key contains the \meta{text} which will be placed below the wheelchart. The \meta{text} is placed in a node. The $x$ coordinate of this node is the $x$ coordinate of the center of the wheelchart, which is defined by the key |at|. In general, this is \emph{not} the same as the $x$ coordinate of the center of the |local bounding box| around the wheelchart. The $y$ coordinate of this node is |0.5| below the south of the |local bounding box| around the wheelchart. The style of this node is given as follows. First, the options |anchor=north,align=center| are given. Thereafter, the style of the key |caption style| is added.
+\end{key}
+\begin{key}{/wheelchart/caption left=\marg{text}}
+This key contains the \meta{text} which will be placed below left of the wheelchart. The \meta{text} is placed in a node. This node is placed |0.5| below the south west of the |local bounding box| around the wheelchart. The style of this node is given as follows. First, the options |anchor=north west,align=left| are given. Thereafter, the style of the key |caption left style| is added.
+\end{key}
+\begin{stylekey}{/wheelchart/caption left style=\marg{options} (initially \normalfont empty)}
+This key accepts a list of keys which will be applied to the node where the contents of the key |caption left| is placed.
+\end{stylekey}
+\begin{stylekey}{/wheelchart/caption style=\marg{options} (initially \normalfont empty)}
+This key accepts a list of keys which will be applied to the node where the contents of the key |caption| is placed.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    at={(5,2)},
+    caption=Caption,
+    caption style={font=\scshape},
+    caption left={Caption left},
+    caption left style={font=\sffamily},
+    middle={\texttt{name=WCname}},
+    name=WCname,
+    start half,
+    title=Title,
+    title style={font=\bfseries},
+    title left={Title left},
+    title left style={font=\em}
+]{%
+    1/Goldenrod/{Text\\with\\multiple\\lines},
+    1/Mahogany/{Text which is longer than the short text},
+    1/JungleGreen/{Another text},
+    1/RoyalBlue/{Short text}%
+}
+\draw[dashed] (WCname.south west) rectangle (WCname.north east);
+\foreach\pos in {north,east,south,west}{
+    \node at (WCname.\pos) {\pos};
+}
+\end{tikzpicture}
+\end{codeexample}
+\end{stylekey}
+\begin{stylekey}{/wheelchart/contour=\marg{options} (initially \normalfont empty)}
+If this key is set then a contour with the style determined by this key will be drawn around the wheelchart.
+\end{stylekey}
+\begin{key}{/wheelchart/counterclockwise=\opt{\meta{boolean}} (default true, initially false)}
+If true, the wheelchart will be drawn counterclockwise instead of clockwise.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    counterclockwise,
+    middle=counterclockwise,
+    middle style={font=\ttfamily}
+]{\exampleforthismanual}
+\end{tikzpicture}
+\end{codeexample}
+\end{key}
+\begin{key}{/wheelchart/data=\marg{text} (initially \textbackslash WCvarC)}
+This key contains the \meta{text} which will be placed at the outside of each slice of the wheelchart. This can be suppressed by using |data={}|. The \meta{text} is placed in a node. The style of this node is given as follows. First, the anchor is set following Table \ref{tableanchorofthekeydatainthecasethatlinesextequaltozero} and Table \ref{tableanchorofthekeydatainthecasethatlinesextstrictlylargerthanzero}. Then the option |align=left| is added. Thereafter, the style of the key |data style| is added.
+\end{key}
+\begin{key}{/wheelchart/data angle shift=\marg{angle} (initially 0)}
+The contents of the key |data| is placed at the angle |\WCdataangle|, which is the sum of the value of the key |data angle shift| in degrees (taking into account the key |counterclockwise|) and the macro |\WCmidangle| modulo $360$.
+\end{key}
+\begin{key}{/wheelchart/data sep=\marg{value} (initially 0.2)}
+If |lines=0|, this key defines the distance between the wheelchart and the contents of the key |data|. If $\text{|lines|}>0$, this key defines the distance between the end of the lines and the contents of the key |data|.
+\end{key}
+\begin{stylekey}{/wheelchart/data style=\marg{options} (initially \normalfont empty)}
+This key accepts a list of keys which will be applied to the node where the contents of the key |data| is placed.
+\end{stylekey}
+\begin{key}{/wheelchart/expand list=\mchoice{false,once,true} (initially once)}
+\begin{description}
+\item[\texttt{false}] In this case, the \meta{wheelchart data} of the command |\wheelchart| will not be expanded.
+\item[\texttt{once}] In this case, the \meta{wheelchart data} of the command |\wheelchart| will be expanded once.
+\item[\texttt{true}] In this case, the \meta{wheelchart data} of the command |\wheelchart| will be fully expanded.
+\end{description}
+The following example illustrates the difference between the possible values of the key |expand list|.
+\begin{codeexample}[width=10cm,preamble={\usepackage{listofitems}}]
+\readlist*\WCcolors{
+    Dandelion,CarnationPink,
+    SpringGreen,ProcessBlue
+}
+\begin{tikzpicture}
+\def\WClistA{a,A}
+\def\WClistB{b,B}
+\def\WCdata{\WClistA,\WClistB}
+\foreach\expandlist [count=\n] in
+    {false,once,true}{
+\wheelchart[
+    at={({3.5*\n},0)},
+    data=\WCvarA,
+    expand list=\expandlist,
+    radius={0}{1},
+    slices style={\WCcolors[\WCcount]},
+    title={expand list=\\\expandlist},
+    title style={font=\ttfamily},
+    value=1
+]{\WCdata}
+}
+\end{tikzpicture}
+\end{codeexample}
+The initial setting |expand list=once| works in most situations, even when commands such as |\ref|, |\cite| and |\textbf| are used such as in the example below.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    %expand list=false,%false also works
+    %expand list=true,%true doesn't work
+    middle={expand list=\\false %
+        {\normalfont or} once},
+    middle style={font=\ttfamily}
+]{%
+    1/Emerald/{Section \ref{Keys}},
+    1/Sepia/{Reference \cite{TtTaPGFp}},
+    1/YellowOrange/{$e^{i\pi}=-1$},
+    1/Salmon/{\textbf{Text}}%
+}
+\end{tikzpicture}
+\end{codeexample}
+In the following example, the \meta{wheelchart data} from the previous example is stored in a macro. In this case, we have to use the initial setting |expand list=once|.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\def\WClist{%
+    1/Emerald/{Section \ref{Keys}},
+    1/Sepia/{Reference \cite{TtTaPGFp}},
+    1/YellowOrange/{$e^{i\pi}=-1$},
+    1/Salmon/{\textbf{Text}}%
+}
+\wheelchart[
+    %expand list=false,
+    %expand list=true,
+    %false and true do not work
+    middle={expand list=\\once},
+    middle style={font=\ttfamily}
+]{\WClist}
+\end{tikzpicture}
+\end{codeexample}
+In the example below, we have to use |expand list=true|.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\def\WCcolorsA{Yellow,Red}
+\def\WCcolorsB{Green,Blue}
+\wheelchart[
+    data={},
+    expand list=true,%false and once
+                     %do not work
+    middle={expand list=true},
+    middle style={font=\large\ttfamily},
+    slices style={\WCvarA},
+    value=1
+]{\WCcolorsA,\WCcolorsB}
+\end{tikzpicture}
+\end{codeexample}
+In the example below, we have to use |expand list=true| and the command |\expandonce| from the package |etoolbox|.
+\begin{codeexample}[width=10cm,preamble={\usepackage{etoolbox}}]
+\begin{tikzpicture}
+\def\WCsliceA{1/Brown/{\emph{A}: $\mu$}}
+\def\WCsliceAfinal{\expandonce\WCsliceA}
+\def\WCsliceB{2/Tan/{\textbf{B}: $\pi$}}
+\def\WCsliceBfinal{\expandonce\WCsliceB}
+\wheelchart[
+    expand list=true,%false and once
+                     %do not work
+    middle={expand list=true},
+    middle style={font=\large\ttfamily},
+]{\WCsliceAfinal,\WCsliceBfinal}
+%\WCsliceA and \WCsliceB do not work
+\end{tikzpicture}
+\end{codeexample}
+\end{key}
+\begin{key}{/wheelchart/explode=\marg{value} (default 0.2, initially 0)}
+This key will shift the slices of the wheelchart with \meta{value} with respect to the center of the wheelchart.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    explode=\WCvarF,
+    pie
+]{\exampleforthismanual}
+\end{tikzpicture}
+\end{codeexample}
+\end{key}
+\begin{key}{/wheelchart/gap=\marg{value} (default 0.05, initially 0)}
+The \meta{value} of this key defines half the distance between two slices of the wheelchart.
+
+The following example illustrates the behaviour of the key |gap| when a slice has $360$ degrees.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\foreach\gap [count=\m] in {0,1}{
+\foreach\pie [count=\n] in {false,true}{
+\wheelchart[
+    at={({5*\m},{-5*\n})},
+    data={},
+    gap=\gap,
+    middle={gap=\gap\\pie=\pie},
+    middle style={font=\ttfamily},
+    pie=\pie,
+    radius={1.5}{2},
+    slices style=Bittersweet,
+    total count=1,
+    value=1
+]{}
+}
+}
+\end{tikzpicture}
+\end{codeexample}
+\end{key}
+\begin{key}{/wheelchart/gap polar=\marg{value} (default 1, initially 0)}
+The \meta{value} of this key defines half the polar gap in degrees between two slices of the wheelchart.
+
+Note the difference between the keys |explode|, |gap| and |gap polar|. This is illustrated in the examples below.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    data={},
+    explode=1,
+    middle={\Large\texttt{explode}},
+    radius={1}{2},
+    slices style={
+        draw=Red,
+        fill=none,
+        ultra thick
+    },
+    total count=6,
+    value=1
+]{}
+\draw (0,0) circle[radius=2];
+\draw (0,0) circle[radius=3];
+\end{tikzpicture}
+\end{codeexample}
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    data={},
+    gap=0.5,
+    middle={\Large\texttt{gap}},
+    slices style={
+        draw=Red,
+        fill=none,
+        ultra thick
+    },
+    total count=6,
+    value=1
+]{}
+\draw (0,0) circle[radius=2];
+\draw (0,0) circle[radius=3];
+\foreach\a in {0,60,120}{
+\foreach\x in {-0.5,0.5}{
+\draw[rotate=\a] (\x,{sqrt(3^2-0.5^2})--
+    (\x,{-sqrt(3^2-0.5^2});
+}
+}
+\end{tikzpicture}
+\end{codeexample}
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    data={},
+    gap polar=10,
+    middle={\Large\texttt{gap polar}},
+    slices style={
+        draw=Red,
+        fill=none,
+        ultra thick
+    },
+    total count=6,
+    value=1
+]{}
+\draw (0,0) circle[radius=2];
+\draw (0,0) circle[radius=3];
+\foreach\a in {30,90,150}{
+\foreach\t in {-10,10}{
+\draw ({\t+\a}:3)--({\t+\a+180}:3);
+}
+}
+\end{tikzpicture}
+\end{codeexample}
+\end{key}
+\begin{key}{/wheelchart/inner data=\marg{text}}
+This key contains the \meta{text} which will be placed at the inside of each slice of the wheelchart. The \meta{text} is placed in a node. The style of this node is given as follows. First, the option |align=left| is given. Thereafter, the style of the key |inner data style| is added.
+\end{key}
+\begin{key}{/wheelchart/inner data sep=\marg{value} (initially 0.2)}
+This key defines the distance between the wheelchart and the contents of the key |inner data|.
+\end{key}
+\begin{stylekey}{/wheelchart/inner data style=\marg{options} (initially \normalfont empty)}
+This key accepts a list of keys which will be applied to the node where the contents of the key |inner data| is placed.
+\end{stylekey}
+\begin{key}{/wheelchart/inner radius=\marg{value} (initially 2)}
+The \meta{value} of this key defines the inner radius of the wheelchart.
+\end{key}
+\begin{key}{/wheelchart/legend=\marg{code}}
+If this key is set then the \meta{code} given to this key will be executed at the end of the command |\wheelchart|.
+\end{key}
+\begin{key}{/wheelchart/legend entry=\marg{code}}
+If this key is set then the \meta{code} given to this key will be executed for each slice of the wheelchart.
+\begin{codeexample}[width=10cm,preamble={\usepackage{etoolbox}}]
+\begin{tikzpicture}
+\def\WClegend{}
+\def\WClegendrow#1#2#3#4#5{\tikz\fill[#1] (0,0) rectangle (0.3,0.3); & #2 & $#3$ & #4 & #5\\}
+\wheelchart[
+    data={},
+    legend entry={
+        \gappto\WClegend{\WClegendrow}
+        \xappto\WClegend{{\WCvarB}{\WCvarC}{\WCvarA}{\WCperc}{\WCvarD}}
+    },
+    legend={
+        \node[anchor=west] at (3.5,0) {%
+            \begin{tabular}{l@{ }lrrl}%
+             & Fruit & Value & Percentage & Vitamines\\\hline%
+            \\[-10pt]%
+            \WClegend\hline%
+             & \textbf{Total} & $\pgfmathprintnumber{\WCtotalnum}$ & & \\%
+            \end{tabular}%
+        };
+    }
+]{\exampleforthismanual}
+\end{tikzpicture}
+\end{codeexample}
+\end{key}
+\begin{key}{/wheelchart/lines=\marg{value} (default 1, initially 0)}
+This key will draw lines of length \meta{value} between the wheelchart and the contents of the key |data|.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\def\WCtest#1#2{%
+    \ifdim \WCpercentage pt>10 pt%
+        #1%
+    \else%
+        #2%
+    \fi%
+}
+\wheelchart[
+    data={\WCtest{}{\WCperc}},
+    lines={
+        1-max(sign(\WCpercentage-10),0)
+    },
+    lines style={dotted,thick},
+    pie,
+    wheel data={\WCtest{\WCperc}{}}
+]{\exampleforthismanual}
+\end{tikzpicture}
+\end{codeexample}
+\end{key}
+\begin{key}{/wheelchart/lines ext=\marg{value} (default 0.5, initially 0)}
+If the \meta{value} of this key is $>0$ then the lines between the wheelchart and the contents of the key |data| will be extended horizontally with a length defined by 	\meta{value}.
+\end{key}
+\begin{key}{/wheelchart/lines ext bottom dir=\mchoice{left,right} (initially right)}
+This key applies when |\WCdataangle|${}\in[270-\text{|lines ext dirsep|},270+\text{|lines ext dirsep|}]$. In this case, this key defines the direction in which the lines between the wheelchart and the contents of the key |data| will be extended horizontally and in this case, this key also determines the anchor of the key |data|.
+\begin{description}
+\item[\texttt{left}] In this case, the lines between the wheelchart and the contents of the key |data| will be extended horizontally to the left and the anchor of the key |data| is the value of the key |lines ext left anchor|.
+\item[\texttt{right}] In this case, the lines between the wheelchart and the contents of the key |data| will be extended horizontally to the right and the anchor of the key |data| is the value of the key |lines ext right anchor|.
+\end{description}
+\end{key}
+\begin{key}{/wheelchart/lines ext dirsep=\marg{angle} (initially 0)}
+This key determines half the angle in degrees of the segment to which the keys |lines ext bottom dir| and |lines ext top dir| apply.
+\end{key}
+\begin{key}{/wheelchart/lines ext fixed=\opt{\meta{boolean}} (default true, initially false)}
+If true, all lines between the wheelchart and the contents of the key |data| will be extended horizontally till the same $x$ coordinate at the left and till the same $x$ coordinate at the right.
+\end{key}
+\begin{key}{/wheelchart/lines ext left anchor=\marg{anchor} (initially mid east)}
+This key defines the anchor of the key |data| when the lines between the wheelchart and the contents of the key |data| are extended horizontally to the left.
+\end{key}
+\begin{key}{/wheelchart/lines ext right anchor=\marg{anchor} (initially mid west)}
+This key defines the anchor of the key |data| when the lines between the wheelchart and the contents of the key |data| are extended horizontally to the right.
+\end{key}
+\begin{key}{/wheelchart/lines ext top dir=\mchoice{left,right} (initially right)}
+This key applies when |\WCdataangle|${}\in[90-\text{|lines ext dirsep|},90+\text{|lines ext dirsep|}]$. In this case, this key defines the direction in which the lines between the wheelchart and the contents of the key |data| will be extended horizontally and in this case, this key also determines the anchor of the key |data|.
+\begin{description}
+\item[\texttt{left}] In this case, the lines between the wheelchart and the contents of the key |data| will be extended horizontally to the left and the anchor of the key |data| is the value of the key |lines ext left anchor|.
+\item[\texttt{right}] In this case, the lines between the wheelchart and the contents of the key |data| will be extended horizontally to the right and the anchor of the key |data| is the value of the key |lines ext right anchor|.
+\end{description}
+\begin{table}[ht]
+\centering
+\begin{tabular}{ll}
+ & Anchor of the key |data|\\
+|\WCdataangle| & in the case that $\text{|lines ext|}>0$\\\hline
+$\rinterval{0}{90-\text{|lines ext dirsep|}}$ & value of the key |lines ext right anchor|\\
+$[90-\text{|lines ext dirsep|},90+\text{|lines ext dirsep|}]$ & value of the key |lines ext left anchor|\\
+ & if |lines ext top dir=left|\\
+ & value of the key |lines ext right anchor|\\
+ & if |lines ext top dir=right|\\
+$\ointerval{90+\text{|lines ext dirsep|}}{270-\text{|lines ext dirsep|}}$ & value of the key |lines ext left anchor|\\
+$[270-\text{|lines ext dirsep|},270+\text{|lines ext dirsep|}]$ & value of the key |lines ext left anchor|\\
+ & if |lines ext bottom dir=left|\\
+ & value of the key |lines ext right anchor|\\
+ & if |lines ext bottom dir=right|\\
+$\ointerval{270+\text{|lines ext dirsep|}}{360}$ & value of the key |lines ext right anchor|\\
+\end{tabular}
+\caption{Anchor of the key \texttt{data} in the case that $\text{\ttfamily lines ext}>0$.}\label{tableanchorofthekeydatainthecasethatlinesextstrictlylargerthanzero}
+\end{table}
+The number of columns in the legend in the example below can be specified with |\WClegendcolumns|.
+\begin{codeexample}[width=10cm,preamble={\usepackage{etoolbox}
+\usetikzlibrary{decorations.markings}}]
+\begin{tikzpicture}
+\def\WClegendcolumns{2}%specify the number of columns in the legend
+\def\WClegendrow#1#2#3{\tikz\fill[#1] (0,0) circle[radius=0.15]; & #2 & $#3$}
+\wheelchart[
+    data={\WCperc},
+    data style={outer xsep=4pt},
+    legend entry={
+        \csgdef{WClegend\WCcount}{}
+        \csgappto{WClegend\WCcount}{\WClegendrow}
+        \csxappto{WClegend\WCcount}{{\WCvarB}{\WCvarC}{\WCvarA}}
+    },
+    legend={
+        \def\WClegend{}
+        \pgfmathsetmacro{\WClegendrows}{int(ceil(\WCtotalcount/\WClegendcolumns))}
+        \foreach\n in {1,...,\WClegendrows}{
+            \foreach\k in {1,...,\WClegendcolumns}{
+                \pgfmathparse{int(\n+(\k-1)*\WClegendrows)}
+                \ifnum\pgfmathresult>\WCtotalcount
+                    \gappto\WClegend{ & & }
+                \else
+                    \gappto\WClegend{\csname WClegend}
+                    \xappto\WClegend{\pgfmathresult}
+                    \gappto\WClegend{\endcsname}
+                \fi
+                \ifnum\k=\WClegendcolumns
+                    \gappto\WClegend{\\}
+                \else
+                    \gappto\WClegend{ & }
+                \fi
+            }
+        }
+        \node[anchor=north,draw,rounded corners,thick] at (0,-4.5) {%
+            \begin{tabular}{*{\WClegendcolumns}{l@{ }lr}}%
+            \WClegend%
+            \end{tabular}%
+        };
+    },
+    lines=0.5,
+    lines ext=1,
+    lines ext bottom dir=left,
+    lines ext dirsep=1,
+    lines ext fixed,
+    lines ext top dir=right,
+    lines sep=0,
+    lines style={
+        \WCvarB,
+        postaction=decorate,
+        decoration={
+            markings,
+            mark=at position 1 with {
+                \fill[\WCvarB] (0,0) circle[radius=0.15];
+            }
+        }
+    },
+    start angle=331.2
+]{\exampleforthismanual}
+\wheelchart[
+    data={},
+    radius={1.5}{2},
+    slices style=\WCvarB!70,
+    start angle=331.2
+]{\exampleforthismanual}
+\end{tikzpicture}
+\end{codeexample}
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    data style={
+        inner sep=0pt,
+        shift={(0,0.1)}
+    },
+    lines,
+    lines ext=1.2,
+    lines ext bottom dir=right,
+    lines ext dirsep=1,
+    %lines ext fixed,
+    lines ext left anchor={base west},
+    lines ext right anchor={base east},
+    lines ext top dir=left,
+    lines sep=-0.5,
+    %lines style=\WCvarB,
+    start angle=331.2
+]{\exampleforthismanual}
+\end{tikzpicture}
+\end{codeexample}
+\begin{codeexample}[width=10cm,preamble={\usetikzlibrary{decorations.markings}}]
+\begin{tikzpicture}
+\wheelchart[
+    data={\WCvarC: \WCvarA},
+    data angle shift=\WCvarG,
+    data style={draw=\WCvarB,fill=\WCvarB!20},
+    lines=1.5,
+    lines ext=1,
+    lines sep=-1,
+    lines style={
+        Black,
+        postaction=decorate,
+        decoration={
+            markings,
+            mark=at position 0 with {
+                \fill[Black] (0,0) circle[radius=0.15];
+            }
+        }
+    },
+    pie,
+    start angle=331.2
+]{\exampleforthismanual}
+\end{tikzpicture}
+\end{codeexample}
+\end{key}
+\begin{key}{/wheelchart/lines sep=\marg{value} (initially 0.2)}
+This key defines the distance between the wheelchart and the start of the lines.
+\end{key}
+\begin{stylekey}{/wheelchart/lines style=\marg{options} (initially \normalfont empty)}
+This key accepts a list of keys which will be applied to the lines drawn by the key |lines|.
+\end{stylekey}
+\begin{key}{/wheelchart/middle=\marg{text}}
+This key contains the \meta{text} which will be placed at the center of the wheelchart. The \meta{text} is placed in a node. The style of this node is given as follows. First, the option |align=center| is given. Thereafter, the style of the key |middle style| is added.
+\end{key}
+\begin{stylekey}{/wheelchart/middle fill=\marg{options} (initially \normalfont empty)}
+If this key is set then the middle of the wheelchart will be filled with this style.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    counterclockwise,
+    data={},
+    middle fill={
+        Green,
+        draw=Red,
+        ultra thick
+    },
+    radius={0.8*\WCcount}
+        {0.4+0.8*\WCcount},
+    slices style={
+        draw=Blue,
+        fill=none,
+        ultra thick
+    },
+    start angle=0,
+    total angle=300,
+    total count=4,
+    value=1
+]{}
+\end{tikzpicture}
+\end{codeexample}
+\end{stylekey}
+\begin{stylekey}{/wheelchart/middle style=\marg{options} (initially \normalfont empty)}
+This key accepts a list of keys which will be applied to the node where the contents of the key |middle| is placed.
+\end{stylekey}
+\begin{key}{/wheelchart/name=\marg{name} (initially wheelchart at name)}
+This key defines the \meta{name} of the |local bounding box| around the wheelchart.
+\end{key}
+\begin{key}{/wheelchart/outer radius=\marg{value} (initially 3)}
+The \meta{value} of this key defines the outer radius of the wheelchart.
+\end{key}
+\begin{key}{/wheelchart/perc precision=\marg{number} (initially 0)}
+This key defines the number of decimals up to which the percentage in the macros |\WCperc| and |\WCpercentagerounded| are rounded.
+\end{key}
+\begin{key}{/wheelchart/pie=\opt{\meta{boolean}} (default true, initially false)}
+If true, the inner radius of the wheelchart is set to |0|.
+\end{key}
+\begin{key}{/wheelchart/radius=\marg{inner radius}\marg{outer radius}}
+This key defines the inner and outer radius of the wheelchart.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    contour={Green,ultra thick},
+    data={},
+    radius={0.5}{\WCcount},
+    slices style=\WCvarA,
+    start angle=180,
+    total angle=180,
+    value=2,
+    wheel lines={\WCvarA!50,ultra thick}
+]{Yellow,Orange,Red,Blue}
+\end{tikzpicture}
+\end{codeexample}
+\begin{codeexample}[width=10cm,preamble={\usepackage{siunitx}}]
+\begin{tikzpicture}
+\def\n{73}
+\wheelchart[
+    data={},
+    middle={{\Huge\qty{\n}{\percent}}},
+    radius={2.5-\WCvarC}{2.5+\WCvarC}
+]{%
+    \n/MidnightBlue/0.5,
+    {100-\n}/BurntOrange/0.3%
+}
+\draw[Gray] (0,0) circle[radius=1.9];
+\end{tikzpicture}
+\end{codeexample}
+\end{key}
+\begin{key}{/wheelchart/slices=\marg{path}}
+If this key is set then the shape of the slices of the wheelchart is defined by \meta{path}.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    data={},
+    radius={2}{2},
+    slices={(90:1) arc[start angle=-30,
+        end angle=-90,radius=1]
+        arc[start angle=-210,
+        end angle=90,radius=1]--cycle;},
+    slices style={
+        /utils/exec={
+            \pgfmathsetmacro
+                {\WCcolornumber}
+                {(\WCcount/
+                    \WCtotalcount)*100}
+        },
+        ForestGreen!\WCcolornumber,
+        draw=RedViolet,
+        ultra thick
+    },
+    total count=6,
+    value=1,
+    wheel data=\WCcount
+]{}
+\end{tikzpicture}
+\end{codeexample}
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    radius={2.7}{3.1},
+    slices={(0,-0.3)--(0.3,0)--(0,0.3)
+        --cycle;},
+    value=1
+]{\exampleforthismanual}
+\wheelchart[
+    data={},
+    value=1
+]{\exampleforthismanual}
+\wheelchart[
+    data={},
+    radius={2}{2},
+    slices={(0,0) circle[radius=0.4];},
+    slices style=White,
+    value=1
+]{\exampleforthismanual}
+\wheelchart[
+    data={},
+    radius={2}{2},
+    slices={(0,0) circle[radius=0.3];},
+    value=1,
+    wheel data=\WCcount
+]{\exampleforthismanual}
+\end{tikzpicture}
+\end{codeexample}
+\end{key}
+\begin{key}{/wheelchart/slices arc=\marg{value 1}\marg{value 2}}
+This key sets both |slices end arc| and |slices start arc|. The effect of \meta{value 1} and \meta{value 2} is shown in the table below.
+
+%\begin{codeexample}[width=10cm]
+\def\exampleslicesarc#1#2{%
+\begin{tikzpicture}[baseline={(0,0)}]
+\draw[Red,ultra thick] (-1,0)--(1,0);
+\pgfmathsetmacro{\angle}{atan(0.5*((1/(#1))-(#1)))}
+\draw (-1,0)--({-(1-(#2))},0) arc[start angle={sign(#1)*180-\angle},end angle={\angle},radius={0.5*(1-(#2))*abs((1/(#1))+(#1))}]--(1,0);
+\end{tikzpicture}%
+}
+\begin{tabular}{l|ccc}
+ & $\text{\meta{value 2}}=-0.5$ & $\text{\meta{value 2}}=0$ & $\text{\meta{value 2}}=0.5$\\\hline
+$\text{\meta{value 1}}=2$ & \exampleslicesarc{2}{-0.5} & \exampleslicesarc{2}{0} & \exampleslicesarc{2}{0.5}\\
+$\text{\meta{value 1}}=1$ & \exampleslicesarc{1}{-0.5} & \exampleslicesarc{1}{0} & \exampleslicesarc{1}{0.5}\\
+$\text{\meta{value 1}}=-1$ & \exampleslicesarc{-1}{-0.5} & \exampleslicesarc{-1}{0} & \exampleslicesarc{-1}{0.5}\\
+$\text{\meta{value 1}}=-2$ & \exampleslicesarc{-2}{-0.5} & \exampleslicesarc{-2}{0} & \exampleslicesarc{-2}{0.5}\\
+\end{tabular}
+%\end{codeexample}
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    slices arc={1}{0}
+]{\exampleforthismanual}
+\end{tikzpicture}
+\end{codeexample}
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    data={},
+    radius={1}{4.5},
+    slices arc={1}{0.66},
+    slices style=\WCvarA,
+    start half,
+    value=1,
+    wheel data={%
+        \textbf{Number \WCcount}\\%
+        \WCvarB%
+    },
+    wheel data pos=0.5,
+    wheel data style=White
+]{%
+    Yellow/{Some text A},
+    Orange/{Some text B},
+    Red/{Some text C},
+    Green/{Some text D},
+    Blue/{Some text E}%
+}
+\end{tikzpicture}
+\end{codeexample}
+\end{key}
+\begin{key}{/wheelchart/slices arrow=\marg{value 1}\marg{value 2}}
+This key is similar to the key |slices arc|.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    gap=0.3,
+    slices arrow={1}{-1}
+]{\exampleforthismanual}
+\end{tikzpicture}
+\end{codeexample}
+\end{key}
+\begin{key}{/wheelchart/slices end arc=\marg{value 1}\marg{value 2}}
+This key is similar to the key |slices arc| but only sets the end of the slice.
+\end{key}
+\begin{key}{/wheelchart/slices end arrow=\marg{value 1}\marg{value 2}}
+This key is similar to the key |slices arrow| but only sets the end of the slice.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\wheelchart[
+    data={},
+    explode=1,
+    middle={\Large Recycle},
+    slices end arrow={1}{-0.5},
+    slices style=Green,
+    total count=3,
+    value=1
+]{}
+\end{tikzpicture}
+\end{codeexample}
+\end{key}
+\begin{key}{/wheelchart/slices start arc=\marg{value 1}\marg{value 2}}
+This key is similar to the key |slices arc| but only sets the start of the slice.
+\end{key}
+\begin{key}{/wheelchart/slices start arrow=\marg{value 1}\marg{value 2}}
+This key is similar to the key |slices arrow| but only sets the start of the slice.
+\end{key}
+\begin{stylekey}{/wheelchart/slices style=\marg{options} (initially \textbackslash WCvarB)}
+This key defines the style of the slices of the wheelchart.
+\end{stylekey}
+\begin{key}{/wheelchart/start angle=\marg{angle} (initially 90)}
+This key defines the \meta{angle} in degrees at which the first slice of the wheelchart starts.
+\end{key}
+\begin{key}{/wheelchart/start half=\marg{angle} (default 90)}
+If this key is set then the middle of the first slice of the wheelchart is positioned at \meta{angle} in degrees.
+\end{key}
+\begin{key}{/wheelchart/title=\marg{text}}
+This key contains the \meta{text} which will be placed above the wheelchart. The \meta{text} is placed in a node. The $x$ coordinate of this node is the $x$ coordinate of the center of the wheelchart, which is defined by the key |at|. In general, this is \emph{not} the same as the $x$ coordinate of the center of the |local bounding box| around the wheelchart. The $y$ coordinate of this node is |0.5| above the north of the |local bounding box| around the wheelchart. The style of this node is given as follows. First, the options |anchor=south,align=center| are given. Thereafter, the style of the key |title style| is added.
+\end{key}
+\begin{key}{/wheelchart/title left=\marg{text}}
+This key contains the \meta{text} which will be placed above left of the wheelchart. The \meta{text} is placed in a node. This node is placed |0.5| above the north west of the |local bounding box| around the wheelchart. The style of this node is given as follows. First, the options |anchor=south west,align=left| are given. Thereafter, the style of the key |title left style| is added.
+\end{key}
+\begin{stylekey}{/wheelchart/title left style=\marg{options} (initially \normalfont empty)}
+This key accepts a list of keys which will be applied to the node where the contents of the key |title left| is placed.
+\end{stylekey}
+\begin{stylekey}{/wheelchart/title style=\marg{options} (initially \normalfont empty)}
+This key accepts a list of keys which will be applied to the node where the contents of the key |title| is placed.
+\end{stylekey}
+\begin{key}{/wheelchart/total angle=\marg{angle} (initially 360)}
+This key defines the total \meta{angle} in degrees of the wheelchart.
+\end{key}
+\begin{key}{/wheelchart/total count=\marg{number}}
+If this key is set then the number of slices of the wheelchart is determined by \meta{number}.
+\begin{codeexample}[width=10cm,preamble={\usepackage{listofitems}}]
+\readlist*\WCcolors{
+    Rhodamine,RedOrange,OrangeRed
+}
+\setsepchar{ }
+\readlist\WCdata{An example with the
+    package \texttt{listofitems} where
+    some keys are given using a list}
+\begin{tikzpicture}
+\wheelchart[
+    data={\WCdata[\WCcount]},
+    slices style={
+        /utils/exec={
+            \pgfmathsetmacro
+                {\WCcolornumber}
+                {int(Mod({\WCcount-1},
+                    \WCcolorslen)+1)}
+        },
+        \WCcolors[\WCcolornumber]
+    },
+    total count={\WCdatalen},
+    value=1
+]{}
+\end{tikzpicture}
+\end{codeexample}
+\begin{codeexample}[width=10cm,preamble={\usepackage{siunitx}}]
+\begin{tikzpicture}
+\def\n{57}
+\wheelchart[
+    data={},
+    gap=0.015,
+    middle={%
+        {\Huge\qty{\n}{\percent}}\\%
+        An ode to the\\%
+        ``Grothendieck prime''%
+    },
+    slices style={
+        /utils/exec={
+            \ifnum\WCcount>\n
+                \def\WCcolor{Gray}
+            \else
+                \def\WCcolor{Cyan}
+            \fi
+        },
+        \WCcolor
+    },
+    total count=100,
+    value=1
+]{}
+\end{tikzpicture}
+\end{codeexample}
+\end{key}
+\begin{key}{/wheelchart/value=\marg{value} (initially \textbackslash WCvarA)}
+This key defines the \meta{value} which corresponds to the size of each slice of the wheelchart.
+\end{key}
+\begin{key}{/wheelchart/wheel data=\marg{text}}
+This key contains the \meta{text} which will be placed on top of each slice of the wheelchart. The \meta{text} is placed in a node. The style of this node is given as follows. First, the option |align=left| is given. Thereafter, the style of the key |wheel data style| is added.
+\end{key}
+\begin{key}{/wheelchart/wheel data pos=\marg{value} (initially 0.66)}
+The radius of the polar coordinate at which the contents of the key |wheel data| is placed is given by the convex combination $\text{|wheel data pos|}\cdot\text{|outer radius|}+(1-\text{|wheel data pos|})\cdot\text{|inner radius|}$.
+\end{key}
+\begin{stylekey}{/wheelchart/wheel data style=\marg{options} (initially \normalfont empty)}
+This key accepts a list of keys which will be applied to the node where the contents of the key |wheel data| is placed.
+\end{stylekey}
+\begin{stylekey}{/wheelchart/wheel lines=\marg{options} (initially \normalfont empty)}
+If this key is set then lines with the style determined by this key will be drawn inside the slices of the wheelchart. The number of these lines depends on the value of the key |value|.
+
+Below is the example from \cite[Subsection 7.6]{TtTaPGFp} recreated with the package |wheelchart|.
+\begin{codeexample}[width=10cm]
+\begin{tikzpicture}
+\colorlet{good}{green!75!black}
+\colorlet{bad}{red}
+\colorlet{neutral}{black!60}
+\colorlet{none}{white}
+\wheelchart[
+    anchor xsep=15,
+    contour=gray,
+    data={``\WCvarC'': \WCvarA{} (\WCperc)},
+    middle={Ratings given by\\\pgfmathprintnumber{\WCtotalnum}~participants},
+    radius={1.8}{2.2},
+    start half=270,
+    wheel lines={black!15,thick}
+]{%
+    10/neutral/ok,
+    9/good!60!white/good,
+    3/good/{very good},
+    20/none/none,
+    0/bad/{very bad},
+    8/bad!60!white/bad%
+}
+\end{tikzpicture}
+\end{codeexample}
+\end{stylekey}
+\begin{thebibliography}{9}
+\bibitem{JhcIparowcltopotPGFm}
+Jake,
+\emph{How can I produce a `ring (or wheel) chart' like that on page 88 of the {\upshape\pgfname} manual?},
+\url{https://tex.stackexchange.com/questions/17898/how-can-i-produce-a-ring-or-wheel-chart-like-that-on-page-88-of-the-pgf-manu/18105#18105},
+2011.
+\bibitem{MpMP}
+Jens-Uwe Morawski,
+\emph{{\upshape\texttt{piechart}\textsf{MP}}},
+Manual for Preliminary Version,
+\url{https://ctan.org/pkg/piechartmp},
+2002.
+\bibitem{RSVpaaMfp}
+Dominique Rodriguez, Michael Sharpe, Herbert Vo{\ss},
+\emph{{\upshape\texttt{pstricks-add} \textsf{additionals Macros for} \texttt{pstricks}}},
+Manual for version 3.92,
+\url{https://ctan.org/pkg/pstricks-add},
+2021.
+\bibitem{Tumfdb}
+Nicola L.C.~Talbot,
+\emph{User Manual for datatool bundle version 2.32},
+\url{https://ctan.org/pkg/datatool},
+2019.
+\bibitem{TtTaPGFp}
+Till Tantau,
+\emph{The \tikzname{} and {\upshape\pgfname} Packages},
+Manual for version 3.1.9a,
+\url{https://ctan.org/pkg/pgf},
+2021.
+\bibitem{XdPCbupp}
+Yuan Xu,
+\emph{Drawing Pie Chart by using {\upshape\texttt{pgf-pie}}},
+Manual for version 0.6,
+\url{https://ctan.org/pkg/pgf-pie},
+2021.
+\end{thebibliography}
+\printindex
+\end{document}
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/doc/latex/wheelchart/wheelchart.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/wheelchart/wheelchart.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/wheelchart/wheelchart.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/wheelchart/wheelchart.sty	2022-09-13 20:41:53 UTC (rev 64373)
@@ -0,0 +1,443 @@
+%% wheelchart.sty
+%% Copyright 2022 Matthias Floré
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+%   http://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+% 
+% The Current Maintainer of this work is Matthias Floré.
+%
+% This work consists of the files wheelchart.pdf, wheelchart.sty,
+% wheelchart.tex and README.md.
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{wheelchart}[2022/09/11 v1.0 Draw wheelcharts with TikZ]
+\RequirePackage{tikz}
+\usetikzlibrary{calc}
+\def\wheelchart at slicesstart{}
+\def\wheelchart at slicesend{}
+\newif\ifwheelchart at contour
+\newif\ifwheelchart at counterclockwise
+\newif\ifwheelchart at definnercontour
+\newif\ifwheelchart at draw
+\newif\ifwheelchart at linesextfixed
+\newif\ifwheelchart at middlefill
+\newif\ifwheelchart at pie
+\newif\ifwheelchart at slicesarcadaptangle
+\newif\ifwheelchart at wheellines
+\newcommand{\wheelchart at slicesarcdefmacros}[2]{
+\pgfmathsetmacro{\wheelchart at slicesarcA}{#1}
+\pgfmathsetmacro{\wheelchart at slicesarcB}{#2}
+\pgfmathsetmacro{\wheelchart at slicesarcradius}{(1-(\wheelchart at slicesarcB))*\n1*abs((1/(\wheelchart at slicesarcA))+(\wheelchart at slicesarcA))/2}
+\wheelchart at slicesarcadaptanglefalse
+\ifdim \wheelchart at slicesarcA pt<\z@
+\pgfmathsetmacro{\wheelchart at slicesarccoord}{max(\wheelchart at slicesarcB,0)}
+\wheelchart at slicesarcadaptangletrue
+\ifdim \wheelchart at slicesarcB pt<\z@
+\else
+\pgfmathsetmacro{\wheelchart at halflengthsliceinnerstartplussliceouterstart}{veclen(\x3/\pgf at xx,\y3/\pgf at yy)}
+\pgfmathsetmacro{\wheelchart at slicesarcradiusbound}{sqrt((\wheelchart at halflengthsliceinnerstartplussliceouterstart^2-((\wheelchart at gap)^2)+((\wheelchart at gap-\wheelchart at slicesarcA*(1-(\wheelchart at slicesarcB))*\n1-\wheelchart at slicesarcradius)^2))}
+\pgfmathsetmacro{\wheelchart at slicesarcradiusboundminusslicesarcradius}{\wheelchart at slicesarcradiusbound-\wheelchart at slicesarcradius}
+\pgfmathsetmacro{\wheelchart at slicesarcradiusboundplusslicesarcradius}{\wheelchart at slicesarcradiusbound+\wheelchart at slicesarcradius}
+\ifdim \wheelchart at slicesarcradiusboundminusslicesarcradius pt>\wheelchart at innerradius pt
+\ifdim \wheelchart at slicesarcradiusboundplusslicesarcradius pt<\wheelchart at outerradius pt
+\wheelchart at slicesarcadaptanglefalse
+\fi
+\fi
+\fi
+\else
+\pgfmathsetmacro{\wheelchart at slicesarccoord}{\wheelchart at slicesarcB}
+\fi
+\pgfmathsetmacro{\wheelchart at slicesarccoordtimesnone}{\wheelchart at slicesarccoord*\n1}
+\ifwheelchart at slicesarcadaptangle
+\pgfmathsetmacro{\wheelchart at slicesarcangle}{-acos((2*(\wheelchart at slicesarccoord-1))/((1-(\wheelchart at slicesarcB))*((1/(\wheelchart at slicesarcA))+(\wheelchart at slicesarcA))))}
+\else
+\pgfmathsetmacro{\wheelchart at slicesarcangle}{atan(((1/(\wheelchart at slicesarcA))-(\wheelchart at slicesarcA))/2)}
+\fi
+}
+\newcommand{\wheelchart at slicesarrowdefmacros}[2]{
+\pgfmathsetmacro{\wheelchart at slicesarrowA}{#1}
+\pgfmathsetmacro{\wheelchart at slicesarrowB}{#2}
+\pgfmathsetmacro{\wheelchart at slicesarrowlength}{\n1}
+\ifdim \wheelchart at slicesarrowA pt<\z@
+\pgfmathsetmacro{\wheelchart at slicesarrowcoord}{max(\wheelchart at slicesarrowB,0)}
+\else
+\pgfmathsetmacro{\wheelchart at slicesarrowcoord}{\wheelchart at slicesarrowB}
+\fi
+\pgfmathsetmacro{\wheelchart at slicesarrowtip}{(1-\wheelchart at slicesarrowcoord)*\wheelchart at slicesarrowA}
+}
+\pgfkeys{
+/wheelchart/.is family,
+/wheelchart,
+anchor xsep/.initial=5,
+anchor ysep/.initial=5,
+at/.initial={(0,0)},
+caption/.store in=\wheelchart at caption,
+caption style/.style={caption style at options/.style={#1}},
+caption style at options/.style={},
+caption left/.store in=\wheelchart at captionleft,
+caption left style/.style={caption left style at options/.style={#1}},
+caption left style at options/.style={},
+contour at boolean/.is if=wheelchart at contour,
+contour/.style={contour at boolean=true,contour at options/.style={#1}},
+contour at options/.style={},
+counterclockwise/.is if=wheelchart at counterclockwise,
+data/.initial={\WCvarC},
+data angle shift/.initial=0,
+data sep/.initial=0.2,
+data style/.style={data style at options/.style={#1}},
+data style at options/.style={},
+expand list/.is choice,
+expand list/false/.code={\def\wheelchart at expandlistvalue{false}\def\wheelchart at foreachdeflist##1{\def\wheelchart at foreachlist{##1}}},
+expand list/once/.code={\def\wheelchart at expandlistvalue{true}\def\wheelchart at foreachdeflist##1{\def\wheelchart at foreachlist{\unexpanded\expandafter{##1}}}},
+expand list/true/.code={\def\wheelchart at expandlistvalue{true}\def\wheelchart at foreachdeflist##1{\def\wheelchart at foreachlist{##1}}},
+expand list=once,
+explode/.initial=0,
+explode/.default=0.2,
+gap/.initial=0,
+gap/.default=0.05,
+gap polar/.initial=0,
+gap polar/.default=1,
+inner data/.store in=\wheelchart at innerdata,
+inner data sep/.initial=0.2,
+inner data style/.style={inner data style at options/.style={#1}},
+inner data style at options/.style={},
+inner radius/.initial=2,
+legend/.store in=\wheelchart at legend,
+legend entry/.store in=\wheelchart at legendentry,
+lines/.initial=0,
+lines/.default=1,
+lines ext/.initial=0,
+lines ext/.default=0.5,
+lines ext bottom dir/.is choice,
+lines ext bottom dir/left/.code={\pgfmathsetmacro{\wheelchart at linesextbottomdir}{-1}},
+lines ext bottom dir/right/.code={\pgfmathsetmacro{\wheelchart at linesextbottomdir}{1}},
+lines ext bottom dir=right,
+lines ext dirsep/.initial=0,
+lines ext fixed/.is if=wheelchart at linesextfixed,
+lines ext left anchor/.initial={mid east},
+lines ext right anchor/.initial={mid west},
+lines ext top dir/.is choice,
+lines ext top dir/left/.code={\pgfmathsetmacro{\wheelchart at linesexttopdir}{-1}},
+lines ext top dir/right/.code={\pgfmathsetmacro{\wheelchart at linesexttopdir}{1}},
+lines ext top dir=right,
+lines sep/.initial=0.2,
+lines style/.style={lines style at options/.style={#1}},
+lines style at options/.style={},
+middle/.store in=\wheelchart at middle,
+middle fill at boolean/.is if=wheelchart at middlefill,
+middle fill/.style={middle fill at boolean=true,middle fill at options/.style={#1}},
+middle fill at options/.style={},
+middle style/.style={middle style at options/.style={#1}},
+middle style at options/.style={},
+name/.code={\xdef\wheelchart at name{#1}},
+name=wheelchart at name,
+outer radius/.initial=3,
+perc precision/.initial=0,
+pie/.is if=wheelchart at pie,
+radius/.code 2 args={\pgfkeys{/wheelchart,inner radius={#1},outer radius={#2}}},
+slices/.store in=\wheelchart at slices,
+slices arc/.code 2 args={\pgfkeys{/wheelchart,slices start arc={-(#1)}{#2},slices end arc={#1}{#2}}},
+slices arrow/.code 2 args={\pgfkeys{/wheelchart,slices start arrow={-(#1)}{#2},slices end arrow={#1}{#2}}},
+slices end arc/.code 2 args={\def\wheelchart at slicesend{{[shift={(wheelchart at sliceouterend)},rotate={90-atan2(\p2)},/utils/exec={\wheelchart at slicesarcdefmacros{#1}{#2}}]--({-\wheelchart at slicesarccoordtimesnone},0) arc[start angle={\wheelchart at counterorclockwise*\wheelchart at slicesarcangle},end angle={\wheelchart at counterorclockwise*(sign(#1)*180-\wheelchart at slicesarcangle)},radius={\wheelchart at slicesarcradius}]}}},
+slices end arrow/.code 2 args={\def\wheelchart at slicesend{{[shift={(wheelchart at sliceouterend)},rotate={90-atan2(\p2)},/utils/exec={\wheelchart at slicesarrowdefmacros{#1}{#2}}]--({-\wheelchart at slicesarrowcoord*\wheelchart at slicesarrowlength},0)--({-\wheelchart at slicesarrowlength},{\wheelchart at counterorclockwise*\wheelchart at slicesarrowtip*\wheelchart at slicesarrowlength})--({(\wheelchart at slicesarrowcoord-2)*\wheelchart at slicesarrowlength},0)}}},
+slices start arc/.code 2 args={\def\wheelchart at slicesstart{{[shift={(wheelchart at sliceinnerstart)},rotate={90-atan2(\p1)},/utils/exec={\wheelchart at slicesarcdefmacros{#1}{#2}}]({\wheelchart at slicesarccoordtimesnone},0) arc[start angle={-\wheelchart at counterorclockwise*(sign(#1)*180-\wheelchart at slicesarcangle)},end angle={-\wheelchart at counterorclockwise*\wheelchart at slicesarcangle},radius={\wheelchart at slicesarcradius}]}--}},
+slices start arrow/.code 2 args={\def\wheelchart at slicesstart{{[shift={(wheelchart at sliceinnerstart)},rotate={90-atan2(\p1)},/utils/exec={\wheelchart at slicesarrowdefmacros{#1}{#2}}]({\wheelchart at slicesarrowcoord*\wheelchart at slicesarrowlength},0)--({\wheelchart at slicesarrowlength},{-\wheelchart at counterorclockwise*\wheelchart at slicesarrowtip*\wheelchart at slicesarrowlength})--({(2-\wheelchart at slicesarrowcoord)*\wheelchart at slicesarrowlength},0)}--}},
+slices style/.style={slices style at options/.style={#1}},
+slices style at options/.style={},
+slices style={\WCvarB},
+start angle/.initial=90,
+start half/.store in=\wheelchart at starthalf,
+start half/.default=90,
+title/.store in=\wheelchart at title,
+title style/.style={title style at options/.style={#1}},
+title style at options/.style={},
+title left/.store in=\wheelchart at titleleft,
+title left style/.style={title left style at options/.style={#1}},
+title left style at options/.style={},
+total angle/.initial=360,
+total count/.code={\pgfmathsetmacro{\wheelchart at totalcount}{int(#1)}},
+value/.initial={\WCvarA},
+wheel data/.store in=\wheelchart at wheeldata,
+wheel data pos/.initial=0.66,
+wheel data style/.style={wheel data style at options/.style={#1}},
+wheel data style at options/.style={},
+wheel lines at boolean/.is if=wheelchart at wheellines,
+wheel lines/.style={wheel lines at boolean=true,wheel lines at options/.style={#1}},
+wheel lines at options/.style={},
+}
+\newcommand{\wheelchart at foreachinitial}[2]{\ifcsname wheelchart at totalcount\endcsname\ifnum\wheelchart at totalcount>1\gdef\wheelchart at foreachlist{}\foreach\wheelchart at n in {2,...,\wheelchart at totalcount}{\xdef\wheelchart at foreachlist{\wheelchart at foreachlist,}}\else\ifnum\wheelchart at totalcount=1\gdef\wheelchart at foreachlist{{}}\else\gdef\wheelchart at foreachlist{}\fi\fi\else\wheelchart at foreachdeflist{#1}\fi\foreach\WCvarA/\WCvarB/\WCvarC/\WCvarD/\WCvarE/\WCvarF/\WCvarG/\WCvarH/\WCvarI/\WCvarJ/\WCvarK/\WCvarL/\WCvarM/\WCvarN/\WCvarO/\WCvarP/\WCvarQ/\WCvarR/\WCvarS/\WCvarT/\WCvarU/\WCvarV/\WCvarW/\WCvarX/\WCvarY/\WCvarZ [count=\WCcount,expand list=\wheelchart at expandlistvalue] in \wheelchart at foreachlist{#2}}
+\newcommand{\wheelchart at foreach}[2]{\pgfmathsetmacro{\wheelchart at angle}{\wheelchart at startangle}\wheelchart at foreachinitial{#1}{\pgfmathsetmacro{\wheelchart at outerradius}{\pgfkeysvalueof{/wheelchart/outer radius}}
+\ifwheelchart at pie
+\pgfmathsetmacro{\wheelchart at innerradius}{0}
+\else
+\pgfmathsetmacro{\wheelchart at innerradius}{\pgfkeysvalueof{/wheelchart/inner radius}}
+\fi
+\pgfmathsetmacro{\wheelchart at gap}{\pgfkeysvalueof{/wheelchart/gap}}
+\pgfmathsetmacro{\wheelchart at gappolar}{\pgfkeysvalueof{/wheelchart/gap polar}}
+\pgfmathsetmacro{\wheelchart at value}{\pgfkeysvalueof{/wheelchart/value}}
+\pgfmathsetmacro{\wheelchart at newangle}{\wheelchart at angle+(\wheelchart at counterorclockwise*\wheelchart at value*(\wheelchart at totalangle/\WCtotalnum))}
+\pgfmathsetmacro{\wheelchart at abshalfangleminusnewangle}{abs((\wheelchart at angle-\wheelchart at newangle)/2)}
+\wheelchart at drawfalse
+\pgfmathsetmacro{\wheelchart at abshalfangleminusnewangleminusgappolar}{\wheelchart at abshalfangleminusnewangle-\wheelchart at gappolar}
+\ifdim \wheelchart at abshalfangleminusnewangleminusgappolar pt=180 pt
+\pgfmathsetmacro{\wheelchart at outergap}{asin(\wheelchart at gap/\wheelchart at outerradius)}
+\ifdim \wheelchart at gap pt<\wheelchart at innerradius pt
+\pgfmathsetmacro{\wheelchart at innergap}{asin(\wheelchart at gap/\wheelchart at innerradius)}
+\else
+\pgfmathsetmacro{\wheelchart at innergap}{90}
+\pgfmathsetmacro{\wheelchart at innerradius}{\wheelchart at gap}
+\fi
+\ifdim \wheelchart at innerradius pt<\wheelchart at outerradius pt
+\wheelchart at drawtrue
+\fi
+\else
+\ifdim \wheelchart at abshalfangleminusnewangleminusgappolar pt>\z@
+\pgfmathsetmacro{\wheelchart at outerradiustimessinabshalfangleminusnewangleminusgappolar}{\wheelchart at outerradius*sin(\wheelchart at abshalfangleminusnewangleminusgappolar)}
+\ifdim \wheelchart at outerradiustimessinabshalfangleminusnewangleminusgappolar pt<\wheelchart at gap pt
+\else
+\pgfmathsetmacro{\wheelchart at outergap}{asin(\wheelchart at gap/\wheelchart at outerradius)+\wheelchart at gappolar}
+\pgfmathsetmacro{\wheelchart at innerradiustimessinabshalfangleminusnewangleminusgappolar}{\wheelchart at innerradius*sin(\wheelchart at abshalfangleminusnewangleminusgappolar)}
+\ifdim \wheelchart at innerradiustimessinabshalfangleminusnewangleminusgappolar pt>\wheelchart at gap pt
+\pgfmathsetmacro{\wheelchart at innergap}{asin(\wheelchart at gap/\wheelchart at innerradius)+\wheelchart at gappolar}
+\else
+\pgfmathsetmacro{\wheelchart at innergap}{\wheelchart at abshalfangleminusnewangle}
+\ifdim \wheelchart at innerradiustimessinabshalfangleminusnewangleminusgappolar pt<\wheelchart at gap pt
+\pgfmathsetmacro{\wheelchart at innerradius}{\wheelchart at gap/sin(\wheelchart at abshalfangleminusnewangleminusgappolar)}
+\fi
+\fi
+\ifdim \wheelchart at innerradius pt<\wheelchart at outerradius pt
+\wheelchart at drawtrue
+\fi
+\fi
+\fi
+\fi
+\pgfmathsetmacro{\wheelchart at explode}{\pgfkeysvalueof{/wheelchart/explode}}
+\pgfmathsetmacro{\WCmidangle}{Mod((\wheelchart at angle+\wheelchart at newangle)/2,360)}
+\pgfmathsetmacro{\wheelchart at dataangleshift}{\pgfkeysvalueof{/wheelchart/data angle shift}}
+\pgfmathsetmacro{\WCdataangle}{Mod(\wheelchart at counterorclockwise*\wheelchart at dataangleshift+\WCmidangle,360)}
+\pgfmathsetmacro{\WCpercentage}{\wheelchart at value/(\WCtotalnum/100)}
+\pgfmathprintnumberto[precision=\pgfkeysvalueof{/wheelchart/perc precision}]{\WCpercentage}{\WCpercentagerounded}
+\begin{scope}[shift={(\WCmidangle:\wheelchart at explode)}]
+#2
+\end{scope}
+\global\let\wheelchart at angle=\wheelchart at newangle}}
+\AtBeginDocument{\@ifpackageloaded{siunitx}{\newcommand{\WCperc}{\qty[round-mode=places,round-precision=\pgfkeysvalueof{/wheelchart/perc precision}]{\WCpercentage}{\percent}}}{\newcommand{\WCperc}{\WCpercentagerounded\,\%}}}
+\newcommand{\wheelchart at ifnotext}[3]{%%https://tex.stackexchange.com/questions/42280/expand-away-empty-macros-within-ifthenelse%https://tex.stackexchange.com/questions/44919/proper-way-to-detect-empty-blank-text
+\begingroup%
+\begin{pgfinterruptpicture}%%https://tex.stackexchange.com/questions/459853/savebox-within-tikzpicture-results-in-an-empty-savebox
+\sbox0{#1}%
+\ifdim\wd0=\z@%
+\gdef\wheelchart at node{0}%
+\else%
+\gdef\wheelchart at node{1}%
+\fi%
+\end{pgfinterruptpicture}%
+\endgroup%
+\ifnum\wheelchart at node=0%
+{#2}%%if #1 is empty
+\else%
+{#3}%%if #1 is not empty
+\fi%
+}
+\newcommand{\wheelchart}[2][]{{
+\pgfkeys{/wheelchart,#1}
+\begin{scope}[shift/.expanded={\pgfkeysvalueof{/wheelchart/at}},local bounding box/.expanded=\wheelchart at name]
+\ifwheelchart at counterclockwise
+\pgfmathsetmacro{\wheelchart at counterorclockwise}{1}
+\else
+\pgfmathsetmacro{\wheelchart at counterorclockwise}{-1}
+\fi
+\pgfmathsetmacro{\wheelchart at totalangle}{\pgfkeysvalueof{/wheelchart/total angle}}
+\pgfmathsetmacro{\WCtotalnum}{0}
+\wheelchart at foreachinitial{#2}{
+\pgfmathsetmacro{\wheelchart at value}{\pgfkeysvalueof{/wheelchart/value}}
+\pgfmathparse{\wheelchart at value+\WCtotalnum}
+\global\let\WCtotalnum=\pgfmathresult
+\ifnum\WCcount=1
+\xdef\wheelchart at firstvalue{\wheelchart at value}
+\fi
+\xdef\WCtotalcount{\WCcount}
+}
+\ifcsname wheelchart at starthalf\endcsname
+\pgfmathsetmacro{\wheelchart at startangle}{Mod(\wheelchart at starthalf-(\wheelchart at counterorclockwise*\wheelchart at firstvalue*0.5*(\wheelchart at totalangle/\WCtotalnum)),360)}
+\else
+\pgfmathsetmacro{\wheelchart at startangle}{Mod(\pgfkeysvalueof{/wheelchart/start angle},360)}
+\fi
+\wheelchart at definnercontourfalse
+\ifwheelchart at contour
+\wheelchart at definnercontourtrue
+\xdef\wheelchart at outercontour{}
+\wheelchart at foreach{#2}{
+\xdef\wheelchart at outercontour{(\wheelchart at newangle:\wheelchart at outerradius) arc[start angle=\wheelchart at newangle,end angle=\wheelchart at angle,radius=\wheelchart at outerradius]--\wheelchart at outercontour}
+}
+\else
+\ifwheelchart at middlefill
+\wheelchart at definnercontourtrue
+\fi
+\fi
+\ifwheelchart at definnercontour
+\xdef\wheelchart at innercontour{}
+\wheelchart at foreach{#2}{
+\xdef\wheelchart at innercontour{\wheelchart at innercontour(\wheelchart at angle:\wheelchart at innerradius) arc[start angle=\wheelchart at angle,end angle=\wheelchart at newangle,radius=\wheelchart at innerradius]--}
+}
+\fi
+\ifwheelchart at middlefill
+\fill[/wheelchart/middle fill at options]
+\ifdim \wheelchart at totalangle pt=360 pt
+\else
+(0,0)--
+\fi
+\wheelchart at innercontour cycle;
+\fi
+\wheelchart at foreach{#2}{
+\ifcsname wheelchart at slices\endcsname
+\begin{scope}[shift={(\WCmidangle:{(\wheelchart at innerradius+\wheelchart at outerradius)/2})},rotate=\WCmidangle]
+\fill[/wheelchart/slices style at options] \wheelchart at slices
+\end{scope}
+\else
+\ifwheelchart at draw
+\pgfmathsetmacro{\wheelchart at sliceinnerstartangle}{\wheelchart at angle+(\wheelchart at counterorclockwise*(\wheelchart at innergap))}
+\pgfmathsetmacro{\wheelchart at sliceinnerendangle}{\wheelchart at newangle-(\wheelchart at counterorclockwise*(\wheelchart at innergap))}
+\pgfmathsetmacro{\wheelchart at sliceouterstartangle}{\wheelchart at angle+(\wheelchart at counterorclockwise*(\wheelchart at outergap))}
+\pgfmathsetmacro{\wheelchart at sliceouterendangle}{\wheelchart at newangle-(\wheelchart at counterorclockwise*(\wheelchart at outergap))}
+\coordinate (wheelchart at sliceinnerstart) at (\wheelchart at sliceinnerstartangle:\wheelchart at innerradius);
+\coordinate (wheelchart at sliceinnerend) at (\wheelchart at sliceinnerendangle:\wheelchart at innerradius);
+\coordinate (wheelchart at sliceouterstart) at (\wheelchart at sliceouterstartangle:\wheelchart at outerradius);
+\coordinate (wheelchart at sliceouterend) at (\wheelchart at sliceouterendangle:\wheelchart at outerradius);
+\fill[/wheelchart/slices style at options] let \p1=($(wheelchart at sliceouterstart)-(wheelchart at sliceinnerstart)$),\p2=($(wheelchart at sliceouterend)-(wheelchart at sliceinnerend)$),\p3=($(wheelchart at sliceinnerstart)!0.5!(wheelchart at sliceouterstart)$),\n1={veclen(\x1/\pgf at xx,\y1/\pgf at yy)/2} in \wheelchart at slicesstart(wheelchart at sliceouterstart) arc[start angle=\wheelchart at sliceouterstartangle,end angle=\wheelchart at sliceouterendangle,radius=\wheelchart at outerradius]\wheelchart at slicesend--(wheelchart at sliceinnerend) arc[start angle=\wheelchart at sliceinnerendangle,end angle=\wheelchart at sliceinnerstartangle,radius=\wheelchart at innerradius]--cycle;
+\fi
+\fi
+}
+\ifwheelchart at wheellines
+\ifdim \wheelchart at totalangle pt=360 pt
+\def\wheelchart at start{1}
+\else
+\def\wheelchart at start{0}
+\fi
+\wheelchart at foreach{#2}{
+\foreach\wheelchart at n in {\wheelchart at start,...,\wheelchart at value}{
+\pgfmathsetmacro{\wheelchart at anglewheellines}{\wheelchart at angle+(\wheelchart at counterorclockwise*\wheelchart at n*(\wheelchart at totalangle/\WCtotalnum))}
+\draw[/wheelchart/wheel lines at options] (\wheelchart at anglewheellines:\wheelchart at innerradius)--(\wheelchart at anglewheellines:\wheelchart at outerradius);
+}
+\gdef\wheelchart at start{1}
+}
+\fi
+\ifwheelchart at contour
+\ifdim \wheelchart at totalangle pt=360 pt
+\draw[/wheelchart/contour at options] \wheelchart at innercontour cycle;
+\draw[/wheelchart/contour at options] \wheelchart at outercontour cycle;
+\else
+\draw[/wheelchart/contour at options] \wheelchart at innercontour\wheelchart at outercontour cycle;
+\fi
+\fi
+\wheelchart at foreach{#2}{
+\pgfmathsetmacro{\wheelchart at datasep}{\pgfkeysvalueof{/wheelchart/data sep}}
+\pgfmathsetmacro{\wheelchart at lines}{\pgfkeysvalueof{/wheelchart/lines}}
+\pgfmathsetmacro{\wheelchart at linesext}{\pgfkeysvalueof{/wheelchart/lines ext}}
+\pgfmathsetmacro{\wheelchart at linessep}{\pgfkeysvalueof{/wheelchart/lines sep}}
+\ifdim \wheelchart at linesext pt>\z@
+\pgfmathsetmacro{\wheelchart at linesextdirsep}{\pgfkeysvalueof{/wheelchart/lines ext dirsep}}
+\pgfmathparse{
+(\WCdataangle<90-\wheelchart at linesextdirsep?"1":
+(\WCdataangle<=90+\wheelchart at linesextdirsep?"\wheelchart at linesexttopdir":
+(\WCdataangle<270-\wheelchart at linesextdirsep?"-1":
+(\WCdataangle<=270+\wheelchart at linesextdirsep?"\wheelchart at linesextbottomdir":
+"1"
+))))
+}
+\edef\wheelchart at linesextdir{\pgfmathresult}
+\draw[/wheelchart/lines style at options] let \p1=(\WCdataangle:{\wheelchart at outerradius+\wheelchart at linessep+\wheelchart at lines}) in (\WCdataangle:{\wheelchart at outerradius+\wheelchart at linessep})--(\p1)
+\ifwheelchart at linesextfixed
+--({\wheelchart at linesextdir*(\wheelchart at outerradius+\wheelchart at linessep+\wheelchart at lines+\wheelchart at linesext)},\y1)
+\else
+--++({\wheelchart at linesextdir*\wheelchart at linesext},0)
+\fi
+coordinate (wheelchart at datacoord);
+\pgfmathparse{
+(\wheelchart at linesextdir==1?"\pgfkeysvalueof{/wheelchart/lines ext right anchor}":
+(\wheelchart at linesextdir==-1?"\pgfkeysvalueof{/wheelchart/lines ext left anchor}":
+))
+}
+\edef\wheelchart at dataanchor{\pgfmathresult}
+\else
+\pgfmathsetmacro{\wheelchart at anchorxsep}{\pgfkeysvalueof{/wheelchart/anchor xsep}}
+\pgfmathsetmacro{\wheelchart at anchorysep}{\pgfkeysvalueof{/wheelchart/anchor ysep}}
+\pgfmathparse{
+(\WCdataangle==0?"west":
+(\WCdataangle==90?"south":
+(\WCdataangle==180?"east":
+(\WCdataangle==270?"north":
+(\WCdataangle<=\wheelchart at anchorysep?"west":
+(\WCdataangle<90-\wheelchart at anchorxsep?"south west":
+(\WCdataangle<=90+\wheelchart at anchorxsep?"south":
+(\WCdataangle<180-\wheelchart at anchorysep?"south east":
+(\WCdataangle<=180+\wheelchart at anchorysep?"east":
+(\WCdataangle<270-\wheelchart at anchorxsep?"north east":
+(\WCdataangle<=270+\wheelchart at anchorxsep?"north":
+(\WCdataangle<360-\wheelchart at anchorysep?"north west":
+"west"
+))))))))))))
+}
+\edef\wheelchart at dataanchor{\pgfmathresult}
+\ifdim \wheelchart at lines pt>\z@
+\draw[/wheelchart/lines style at options] (\WCdataangle:{\wheelchart at outerradius+\wheelchart at linessep})--++(\WCdataangle:\wheelchart at lines) coordinate[shift={(\WCdataangle:\wheelchart at datasep)}] (wheelchart at datacoord);
+\else
+\coordinate (wheelchart at datacoord) at (\WCdataangle:{\wheelchart at outerradius+\wheelchart at datasep});
+\fi
+\fi
+\wheelchart at ifnotext{\pgfkeysvalueof{/wheelchart/data}}{}{\node[anchor=\wheelchart at dataanchor,align=left,/wheelchart/data style at options] at (wheelchart at datacoord) {\pgfkeysvalueof{/wheelchart/data}};}
+\ifcsname wheelchart at innerdata\endcsname
+\wheelchart at ifnotext{\wheelchart at innerdata}{}{%
+\pgfmathsetmacro{\wheelchart at innerdatasep}{\pgfkeysvalueof{/wheelchart/inner data sep}}%
+\node[align=left,/wheelchart/inner data style at options] at (\WCdataangle:{\wheelchart at innerradius-(\wheelchart at innerdatasep)}) {\wheelchart at innerdata};%
+}
+\fi
+\ifcsname wheelchart at wheeldata\endcsname
+\wheelchart at ifnotext{\wheelchart at wheeldata}{}{%
+\pgfmathsetmacro{\wheelchart at wheeldatapos}{\pgfkeysvalueof{/wheelchart/wheel data pos}}%
+\node[align=left,/wheelchart/wheel data style at options] at (\WCdataangle:{\wheelchart at wheeldatapos*\wheelchart at outerradius+(1-\wheelchart at wheeldatapos)*\wheelchart at innerradius}) {\wheelchart at wheeldata};%
+}
+\fi
+\ifcsname wheelchart at legendentry\endcsname
+\wheelchart at legendentry
+\fi
+}
+\ifcsname wheelchart at middle\endcsname
+\wheelchart at ifnotext{\wheelchart at middle}{}{%
+\node[align=center,/wheelchart/middle style at options] at (0,0) {\wheelchart at middle};%
+}
+\fi
+\ifcsname wheelchart at legend\endcsname
+\wheelchart at legend
+\fi
+\end{scope}
+\ifcsname wheelchart at captionleft\endcsname
+\wheelchart at ifnotext{\wheelchart at captionleft}{}{%
+\node[anchor=north west,align=left,/wheelchart/caption left style at options] at ($(\wheelchart at name.south west)-(0,0.5)$) {\wheelchart at captionleft};%
+}
+\fi
+\ifcsname wheelchart at caption\endcsname
+\wheelchart at ifnotext{\wheelchart at caption}{}{%
+\coordinate[shift/.expanded={\pgfkeysvalueof{/wheelchart/at}}] (wheelchart at center) at (0,0);%
+\node[anchor=north,align=center,/wheelchart/caption style at options] at ($(\wheelchart at name.south-|wheelchart at center)-(0,0.5)$) {\wheelchart at caption};%
+}
+\fi
+\ifcsname wheelchart at titleleft\endcsname
+\wheelchart at ifnotext{\wheelchart at titleleft}{}{%
+\node[anchor=south west,align=left,/wheelchart/title left style at options] at ($(\wheelchart at name.north west)+(0,0.5)$) {\wheelchart at titleleft};%
+}
+\fi
+\ifcsname wheelchart at title\endcsname
+\wheelchart at ifnotext{\wheelchart at title}{}{%
+\coordinate[shift/.expanded={\pgfkeysvalueof{/wheelchart/at}}] (wheelchart at center) at (0,0);%
+\node[anchor=south,align=center,/wheelchart/title style at options] at ($(\wheelchart at name.north-|wheelchart at center)+(0,0.5)$) {\wheelchart at title};%
+}
+\fi
+}}
+\endinput
\ No newline at end of file


Property changes on: trunk/Master/texmf-dist/tex/latex/wheelchart/wheelchart.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2022-09-13 20:40:27 UTC (rev 64372)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2022-09-13 20:41:53 UTC (rev 64373)
@@ -865,7 +865,7 @@
     voss-mathcol
     vpe vruler vtable vwcol
   wadalab wallcalendar wallpaper warning warpcol
-    was wasy wasy-type1 wasysym webguide webquiz
+    was wasy wasy-type1 wasysym webguide webquiz wheelchart
     widetable widows-and-orphans williams willowtreebook
     windycity withargs witharrows
     wnri wnri-latex wordcount wordlike worldflags worksheet

Modified: trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc	2022-09-13 20:40:27 UTC (rev 64372)
+++ trunk/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc	2022-09-13 20:41:53 UTC (rev 64373)
@@ -231,6 +231,7 @@
 depend utfsym
 depend venndiagram
 depend visualpstricks
+depend wheelchart
 depend worldflags
 depend xistercian
 depend xpicture

Added: trunk/Master/tlpkg/tlpsrc/wheelchart.tlpsrc
===================================================================


More information about the tex-live-commits mailing list.