15) { $graph['barwidth'] = 15; } for ($i=1;$i<=$graph['numbars'];$i++) { $graph[$i]['top'] = 148-(round(($graph[$i]['rawdata']/100)*147)); $graph[$i]['right'] = 598-(($i-1)*$graph['barwidth']); $graph[$i]['left'] = $graph[$i]['right']-$graph['barwidth']+1; $graph[$i]['color'] = imagecolorallocate($graph['image'],$graph[$i]['r'],$graph[$i]['g'],$graph[$i]['b']); imagefilledrectangle($graph['image'],$graph[$i]['left'],$graph[$i]['top'],$graph[$i]['right'],148,$graph[$i]['color']); } //write titles imagettftext($graph['image'],10,0,2,12,$graph['colors']['black'],'Tahoma',$graph['title1']); imagettftext($graph['image'],10,0,2,26,$graph['colors']['black'],'Tahoma',$graph['title2']); //write y axis text imagettftext($graph['image'],8,90,111,147,$graph['colors']['black'],'LuCon',$graph['y1']); imagettftext($graph['image'],8,90,126,147,$graph['colors']['black'],'LuCon',$graph['y2']); //write x axis text imagettftext($graph['image'],8,0,151,197,$graph['colors']['black'],'LuCon',$graph['x'].' Bar Width:'.$graph['barwidth']); //allocate text color for generation line $graph['color'] = imagecolorallocate($graph['image'],100,100,100); //write generation line imagettftext($graph['image'],8,90,10,198,$graph['color'],'Tahoma','© IceBlue - Powered by PHP'); //output image to browser imagepng($graph['image']); //destroy image imagedestroy($graph['image']); ?>