又出现了 $bplot2->SetLegend("中文乱码");//乱
$graph->title->Set("每日订单量月统计图");//不乱
同一页面
jpgraph jpgraph_bar.php中没有SetFont(FF_SIMSUN,FS_BOLD);这个方法呀高手出来吧。一般title有乱码,但是很少有人提到柱状图  legend乱码的!!
<?php 
    header('Content-Type: text/html; charset=utf-8');
    session_start();   
require_once "include/AdminDBAction.php";
require_once "globalFunc.php";
require_once "define.inc.php";
    
    include_once("jpgraph/src/jpgraph.php");
include_once("jpgraph/src/jpgraph_bar.php"); $arrid=AdminDBAction::merInfoCount();
  //var_dump($arrid);
$ydata=Array();
$ydata2=Array();
$nameArr=Array();
 foreach($arrid as $id){
            $ydata[]=$id[0];
    $ydata2[]=$id[1];
    $nameArr[]=$id[2];
//echo $id[2]."<br>";

     }

$graph = new Graph(750,450,'auto'); 
$graph->SetScale('textlin');
$graph->img->SetMargin(40,160,30,40);
$graph->SetMarginColor("lightblue");        
$graph->legend->SetShadow('[email protected]');
$graph->legend->SetFillColor('[email protected]');
$graph->xaxis->SetTickLabels($nameArr);
//$graph->xaxis->SetFont(FF_SIMSUN,FS_BOLD);$graph->xaxis->title->SetMargin(8);
$graph->xaxis->title->SetColor('white');
$graph->xaxis->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->SetColor('white');
$graph->yaxis->SetFont(FF_FONT1,NORMAL);
$graph->title->Set("本月商家销售信息表");$graph->title->SetMargin(3);
$graph->title->SetFont(FF_SIMSUN,FS_BOLD,14); $bplot1 = new BarPlot($ydata);
$bplot2 = new BarPlot($ydata2);
//$bplot1->SetFont(FF_SIMSUN,FS_BOLD);
//$bplot2->SetFont(FF_SIMSUN,FS_BOLD);
$bplot1->SetFillColor('[email protected]');
$bplot2->SetFillColor('[email protected]');$bplot1->value->Show();
$bplot2->value->Show();
$bplot1->SetLegend(单子统计);
$bplot2->SetLegend(金额统计);$bplot1->SetShadow('[email protected]');
$bplot2->SetShadow('[email protected]');$gbarplot = new GroupBarPlot(array($bplot1,$bplot2));
$graph->Add($gbarplot);
$graph->Stroke(); ?>