本帖最后由 h9zhou 于 2014-05-12 15:31:35 编辑 jpgraph图表使用问题,在显示图表的php文件一引入类 ,就无法输出图表,图表就变成一个叉,是jpgraph不支持吗
在问个问题 jpgraph 这东西要不要学,实际用的多吗?
setscale('textlin');
$graph->setmargincolor('silver');
// setup title
$str=;
$id=$_request['id'];
if($id==1){
$str=支持布什的情况统计图;
}else if($id==2) {
$str=支持奥巴马的情况统计图;
}
$graph->title->set($str);
$graph->title->setfont(ff_simsun,fs_bold,14);
// create the first bar
$bplot = new barplot($datay1);
$bplot->setfillgradient('antiquewhite2','antiquewhite4:0.8',grad_vert);
$bplot->setcolor('darkred');
// create the second bar
$bplot2 = new barplot($datay2);
$bplot2->setfillgradient('olivedrab1','olivedrab4',grad_vert);
$bplot2->setcolor('darkgreen');
// and join them in an accumulated bar
$accbplot = new accbarplot(array($bplot,$bplot2));
$graph->add($accbplot);
$graph->stroke();
?>
------解决方案--------------------
去掉所有相关文件的 bom 头 和
