1.首先设置字体,如标题:
$graph->title->SetFont(FF_SIMSUN,FS_BOLD,14);
2.修改JPgraph的jpgraph_ttf.inc.php
将其中的:
elseif( $aFF === FF_SIMSUN ) {
// Do Chinese conversion
// if( $this->g2312 == null ) {
// include_once 'jpgraph_gb2312.php' ;
// $this->g2312 = new GB2312toUTF8();
//}
//return $this->g2312->gb2utf8($aTxt);
return $aTxt;
}
按照上述方法注释掉,直接返回$aTxt即可。