i've tried to plot a graph and i ended up with the following "rubbish" .
what does that means?
where did i go wrong?
‰PNG IHDREExKàéDATxœç=EE FEGE“€DG4su({žˆE8Wm E!佄‘Ÿ§EAíATŒÔ€EGú±K)EEEEžlŒEâKEEE‰@çŽEW;p oooE™½žEžEžEžEžEžEžEžEžEžEžEžEžEžEžEžEžEžEž—rzE”~zúîoEzYS5›æVƒkŠîsxV‡‡çPaU¤RE~êZõ‚Õ;<DE‚²›íEš[‘uE–„ ;ÝE,œÕ•˜iEGŠöAo‹ÌŒcEtEEäÞ²EŒõEéGEžï`4““éšèGåiE—URŽËJEƒ_biTæ@æéääçKPàDŠéêKE E//‘N///à]}+EúHSWEtê€pE~Eu„Y[çåG;º8ãêsE•ÕE„¯“jEEE meVSSsÆ\–Hr?šŸÊZUE-šã\‘GE+˜ãweEEE%'3E—íá©EEU‰çQfãÅEEžlŒvœ÷Y™“ûp E$w~"‰@çŽEöfEœÂMHß“•\”éÍŸE}ÿû·™ž¥ƒdžEžEžEžEžEžEžEžŸèE”Áÿ*5EJÿyJE5{EbEEâá–†aEEEMEEErŸ„e]-AEh•›ãn2âìês•cE
======= mygraph.php ==========
<?php
require_once("./lib/dbfunctions.php");
require_once("graph_disp.php");
$dd="2004-07-21";
?>
<html><head></head><body>
<?php
graph_charge($dd);
//ob_end_flush();
?>
</body></html>
====== graph_disp.php====
<?php
include ("/usr/local/lib/php/jpgraph/jpgraph.php");
include ("/usr/local/lib/php/jpgraph/jpgraph_pie.php");
include ("/usr/local/lib/php/jpgraph/jpgraph_bar.php");
function graph_charge2($d){
$list=List($d); //sql enquiry
// If no entries
if(mysql_num_rows($list)==0){
echo "empty!";
else{
while($row = mysql_fetch_array($list)){
$data[]=$row[total]; $leg[]=$row[name]; }
$graph = new Graph(250,150,"auto");
$graph->SetScale("textint");
$graph->img->SetMargin(50,30,50,50);
$graph->AdjBackgroundImage(0.4,0.7,-1);
$graph->SetShadow();
$graph->xaxis->SetTickLabels($leg);
/* -------------------- */
/* Plotting */
/* -------------------- */
$bplot = new BarPlot($data);
$bplot->SetFillColor("lightgreen");
$bplot->value->Show();
$bplot->value->SetFont(FF_FONT1,FS_BOLD);
//$bplot->value->SetAngle(45);
$bplot->value->SetColor("black","navy");
/* --------------------- */
/* Displaying graph */
/* --------------------- */
$graph->Add($bplot);
$graph->Stroke();
}
}