$datay=array(); //纵坐标数据
$datax=array(); //横坐标数据
foreach ($usernums as $key => $value){
$datay[] = $value;
$datax[] = $userids[$key];
}
require_once (‘jpgraph-3.0.7/jpgraph/jpgraph.php’);
require_once (‘jpgraph-3.0.7/jpgraph/jpgraph_bar.php’);
// Create the graph. These two calls are always required
$graph = new Graph(800,600); //图像高宽
$graph->SetScale(“textlin”);
$graph->xaxis->SetTickLabels($datax);
$graph->xaxis->SetFont(FF_VERDANA,FS_NORMAL,10);
$graph->xaxis->SetLabelAngle(30);
$graph->yaxis->scale->SetGrace(20);
$graph->xaxis->scale->SetGrace(20);
// Add a drop shadow
$graph->SetShadow();
// Adjust the margin a bit to make more room for titles
$graph->img->SetMargin(40,30,20,40);
// Create a bar pot
$bplot = new BarPlot($datay);
// Adjust fill color
$bplot->SetFillColor(‘orange’);
$bplot->value->Show();
$bplot->value->SetFont(FF_ARIAL,FS_BOLD,10);
$bplot->value->SetAngle(45);
$bplot->value->SetFormat(‘%d’);
$graph->Add($bplot);
// Setup the titles
$graph->title->Set(iconv(“UTF-8″, “gb2312″,”用户消费报表图”));
$graph->xaxis->title->Set(iconv(“UTF-8″, “gb2312″,”用户姓名”));
$graph->yaxis->title->Set(iconv(“UTF-8″, “gb2312″,”用户订单数量”));
$graph->xaxis->title->SetFont(FF_SIMSUN,FS_BOLD);
$graph->yaxis->title->SetFont(FF_SIMSUN,FS_BOLD);
$graph->title->SetFont(FF_SIMSUN,FS_BOLD);
// Display the graph
$graph->Stroke();
?>
模拟火车
模拟火车让你当回真正的火车司机,得先学会看信号灯、操作控制杆
可口的披萨美味的披萨
可口的披萨美味的披萨带您体验经营一家披萨店的乐趣。游戏画风温
定制虚拟偶像最新版
定制虚拟偶像最新版是一款超级经典有趣的日本模拟装扮类型的手游
病娇模拟器手机版正版(yandere simulator)
病娇模拟器最新版手游是一款萌妹二次元模拟游戏,玩家在游戏中可
停车场多人游戏最新版
停车场多人游戏对于喜欢停车手游的玩家是非常受欢迎的,游戏中你