This one has been killing me for a while.
I am creating a pie chart with JPGraphs. I'm inserting minutes to be displayed right now, but I would like to convert them into hours to show. When I do so, it shows 0. I suppose since the number of minutes is less than an hour, and it does not display decimal points.
This is my code snippet
Code: Select all
$xdata=array();
$ydata=array();
$xlables=array();
if($num_rows>=1){
$row=mysql_fetch_assoc($result);
do{
$mins= $row['minutes'];
$divider = doubleval(60);
$hrs = $mins/$divider;
array_push($xdata,$mins);
array_push($ydata,trim($row['parent_task_name']));
$name=$rowName['ln'];
} while($row = mysql_fetch_assoc($result));
}
Thanks a lot,
-Seyed