From 24affa614bcbc188a7a6b70fc41157e3570a7660 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 4 Apr 2007 02:52:30 +0000 Subject: [PATCH] Don't call intval() on the percentages because then we can end up with bad data sets --- GraphPie.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GraphPie.php b/GraphPie.php index b91293d..317a38d 100644 --- a/GraphPie.php +++ b/GraphPie.php @@ -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])); } } -- 2.22.5