summaryrefslogtreecommitdiff
path: root/dev/pgf-pie.sty
diff options
context:
space:
mode:
authorXu Yuan <xu@informatik.hu-berlin.de>2011-10-02 01:53:44 +0200
committerXu Yuan <xu@informatik.hu-berlin.de>2011-10-02 01:53:44 +0200
commitf3193e298365ffc0e9a9170f27973118d22f1e57 (patch)
treeb8786a5961efd04350926e30da282c994571b008 /dev/pgf-pie.sty
parentd0c5777e228fe74a807586c1f6640d7cfcda98c4 (diff)
downloadpgf-pie-f3193e298365ffc0e9a9170f27973118d22f1e57.tar.gz
pgf-pie-f3193e298365ffc0e9a9170f27973118d22f1e57.tar.bz2
pgf-pie-f3193e298365ffc0e9a9170f27973118d22f1e57.zip
make sure the area is comparable in polar area diagram
Diffstat (limited to 'dev/pgf-pie.sty')
-rw-r--r--dev/pgf-pie.sty5
1 files changed, 3 insertions, 2 deletions
diff --git a/dev/pgf-pie.sty b/dev/pgf-pie.sty
index 7407f90..c9fe681 100644
--- a/dev/pgf-pie.sty
+++ b/dev/pgf-pie.sty
@@ -164,7 +164,7 @@ chart by using PGF/Tikz package.]
}
\pgfmathparse{\sum / \value{pgfpie@sliceLength}}
\xdef\polarangle{\pgfmathresult}
- \pgfmathparse{\radius / \maxValue}
+ \pgfmathparse{\radius / sqrt(\maxValue)}
\xdef\polarRadiusUnit{\pgfmathresult}
\else
\xdef\theradius{\radius}
@@ -177,7 +177,8 @@ chart by using PGF/Tikz package.]
\ifpolar
% Polar area diagram
\addtocounter{pgfpie@angleEnd}{\polarangle}
- \xdef\theradius{\p*\polarRadiusUnit}
+ \pgfmathparse{sqrt(\p) * \polarRadiusUnit}
+ \xdef\theradius{\pgfmathresult}
\else
% normal pie
\addtocounter{pgfpie@angleEnd}{\p}