% This file is embedded in datatool-user.pdf version 3.4.4 2026-07-31
% Example 120 Pie Chart (Inner and Outer Labels)
% Label: "ex:piechartlabels"
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
% sample CSV file:
\begin{filecontents}[noheader,overwrite]{fruit.csv}
Name,Quantity
"Apples",30
"Pears",25
"Lemons,Limes",40.5
"Peaches",34.5
"Cherries",20
\end{filecontents}


\usepackage{datapie}
% Load data from fruit.csv file:
\DTLsetup{store-datum,default-name=fruit}
\DTLread{fruit.csv} 
\begin{document}
\DTLpiechart
{
 variable=\Quantity,
 inner-label=\DTLpiepercent,
 outer-label=\Name
}
{fruit}% database
{\Quantity=Quantity,\Name=Name} 
\end{document}
