Don't call intval() on the percentages because then we can end up with bad data sets
authorRobert Sesek <rsesek@bluestatic.org>
Wed, 4 Apr 2007 02:52:30 +0000 (02:52 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Wed, 4 Apr 2007 02:52:30 +0000 (02:52 +0000)
GraphPie.php

index b91293dd01eb24e00159316bbb37c9f367ecde3b..317a38d3e06f9539fd0728e344338f723ee4a31a 100644 (file)
@@ -123,7 +123,7 @@ class BSGraphPie extends BSGraph
        */
        public function addDataSet($name, $percent)
        {
-               $this->dataset[] = array($name, intval($percent), $this->_fetchColor());
+               $this->dataset[] = array($name, $percent, $this->_fetchColor());
        }
        
        // ###################################################################
@@ -138,7 +138,7 @@ class BSGraphPie extends BSGraph
        */
        public function addDataSetColor($name, $percent, $color)
        {
-               $this->dataset[] = array($name, intval($percent), imagecolorallocate($this->image, $color[0], $color[1], $color[2]));
+               $this->dataset[] = array($name, $percent, imagecolorallocate($this->image, $color[0], $color[1], $color[2]));
        }
 }