Jpgraph charts cannot be exported using the introduction class
This post was last edited by H9zhou on 2014-05-12 15:31:35
Jpgraph chart use problem, in the display diagram of PHP file Introduction class, you cannot output the chart, the chart becomes a fork, is jpgraph not supported?
Ask a question jpgraph this thing want to learn, actually use much?
Require_once (' SqlHelper.class.php ');//This is the class I wrote, used to manipulate the database, but a mistake was introduced.
Require_once (' jpgraph/jpgraph.php ');
Require_once (' jpgraph/jpgraph_bar.php ');
$datay 1=array (12,12,15);
$datay 2=array (0,0,0);
Create the graph.
$graph = new Graph (350,250);
$graph->setscale (' Textlin ');
$graph->setmargincolor (' Silver ');
Setup Title
$str = "";
$id =$_request[' id '];
if ($id ==1) {
$STR = "Support for Bush's situation chart";
}else if ($id ==2) {
$STR = "Support Obama's situation chart";
}
$graph->title->set ($STR);
$graph->title->setfont (ff_simsun,fs_bold,14);
Create the first bar
$bplot = new Barplot ($datay 1);
$bplot->setfillgradient (' AntiqueWhite2 ', ' antiquewhite4:0.8 ', grad_vert);
$bplot->setcolor (' darkred ');
Create the second bar
$bplot 2 = new Barplot ($datay 2);
$bplot 2->setfillgradient (' olivedrab1 ', ' olivedrab4 ', grad_vert);
$bplot 2->setcolor (' Darkgreen ');
and join them in an accumulated bar
$accbplot = new Accbarplot (Array ($bplot, $bplot 2));
$graph->add ($accbplot);
$graph->stroke ();
?>
------Solution--------------------
Remove all relevant documents from the BOM header and