a weird problem of graph height. i refer to the codes below. the chart generation is fine when $height > 120. whenever i tried the values such as 100, 110, 120, etc and refreshed the page, the page was hung for minutes and nothing showed up, even no error msg. i cannot figure out what's going wrong. please give a hand
include($lpath."pChart/pData.class");
include($lpath."pChart/pChart.class");
include($lpath."pChart/pCache.class");
// Dataset definition
$DataSet = new pData;
$Requete = "SELECT schinitial as sch, count(*) as num from OTcount as c, OTlocation as p where c.trapID = p.serialno and datecollect > '".date('Y-m-d', strtotime("-90 days"))."' group by schinitial;";
$result = mysql_query($Requete,$conn);
while ($row = mysql_fetch_array($result))
{
$DataSet->AddPoint($row["num"],"Serie1");
$DataSet->AddPoint($row["sch"],"Serie2");
}
$DataSet->AddAllSeries();
$DataSet->SetAbsciseLabelSerie("Serie2");
$DataSet->SetYAxisName("Entry");
// Initialise the graph
$width = 600;
$height = 121;
$Test = new pChart($width,$height);
$Test->setFontProperties($lpath."Fonts/tahoma.ttf",8);
$Test->setGraphArea(60,20,$width-20,$height-25);
$Test->drawFilledRoundedRectangle(2,2,$width-7,$height-7,5,240,240,240);
$Test->drawRoundedRectangle(0,0,$width-5,$height-5,5,230,230,230);
$Test->drawGraphArea(255,255,255,TRUE);
$Test->drawScale($DataSet->GetData(),$DataSet->GetDataDescription(),SCALE_NORMAL,150,150,150,TRUE,0,0,TRUE);
$Test->drawGrid(4,TRUE,230,230,230,50);
// Draw the 0 line
$Test->setFontProperties("$lpath.Fonts/tahoma.ttf",6);
$Test->drawTreshold(0,143,55,72);
// Draw the bar graph
$Test->drawBarGraph($DataSet->GetData(),$DataSet->GetDataDescription(),TRUE);
// Finish the graph
$Test->setFontProperties($lpath."Fonts/tahoma.ttf",8);
//$Test->drawLegend(65,25,$DataSet->GetDataDescription(),255,255,255);
$Test->setFontProperties($lpath."Fonts/tahoma.ttf",9);
$Test->drawTitle(0,14,"School Contribution in the Last 90 Days",50,50,50,$width);
$Test->Render($target);