1、安装JPGRAPH及改程序
(1)、安装:JpGraph PHP5 version Version: 3.0.7,从http://www.aditus.nu/jpgraph/jpdownload.php 下载最新版本,记得看清对应的PHP版本。解压缩其中子目录src至mantis/library目录下,改名为jpgraph
(2)、修改文件mantis/library/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);
}
改为
elseif( $aFF === FF_SIMSUN ) {
// Do Chinese conversion
return $aTxt;
}
2、后台设置:
(1)安装插件:管理--》管理插件--》安装MantisGraph插件
(2)修改程序:
文件mantis/plugins/MantisGraph/pages/config.php(记得本文件改完后用Ultraedit用ASC-II至UTF-8的转换功能保存为UTF-8格式文件,与总体字符集保持一致):
$t_current_font_selected = array(
'simsun' => false, //增加这一行
'arial' => false,
//--------------------------------------
Sans-serif:<br />
<label><input type="radio" name="font" value="simsun"<?php echo print_font_checked( 'simsun' )?>/>宋体</label><br /> //增加这一行
<label><input type="radio" name="font" value="arial"<?php echo print_font_checked( 'arial' )?>/>Arial</label><br />
//---------------------------------------------------------------------
文件mantis/plugins/MantisGraph/pages/config_edit.php:
if ( plugin_config_get( 'font' ) != $f_font ) {
switch ( $f_font ) {
case 'simsun': //增加这一行
case 'arial':
//----------------------------------------------------------------------
文件mantis/plugins/MantisGraph/core/graph_api.php:
$t_font_map = array(
'simsun' => FF_SIMSUN, //增加这一行
'arial' => FF_ARIAL,
3、设置并启用:
(1)、管理--》管理插件--》点击“MantisGraph 1.0”名字进入设置界面,
(2)、Graph library to use选择“Jpgraph”,Font选择“宋体”
(3)、点击“更改配置”后再看看统计报表中内容,是否已如你所愿。
mantis1.2.2 图形报表设置
最新推荐文章于 2024-09-11 00:04:15 发布