jpgraph.php生成3D饼图
利用php生成图片的方式很多,现在我在这里介绍下我自己用的jpgraph.php,感觉这个插件用起来还不错,就拿出来和大家分享下,大侠们手下留情勿拍砖。至于jpgraph插件自己在网上下一个
利用php生成图片的方式很多,现在我在这里介绍下我自己用的jpgraph.php,感觉这个插件用起来还不错,就拿出来和大家分享下,大侠们手下留情勿拍砖。至于jpgraph插件自己在网上下一个,很多了,哈哈!
public function pietest() {
require_once ("../src/jpgraph.php");
require_once ("../src/jpgraph_pie.php");
require_once ("../src/jpgraph_pie3d.php");
$data = array(
24,
23,
96,
18
);
$graph = new PieGraph(300, 200);
$graph->SetShadow();
$graph->title->Set(mb_convert_encoding("用户消费报表图", "html-entities", "utf-8"));
$graph->title->SetFont(FF_SIMSUN, FS_BOLD);
$p1 = new PiePlot3D($data);
$p1->SetSize(0.5);
$p1->SetCenter(0.4);
$p1->SetColor("red");
$p1->SetLegends($gDateLocale->GetShortMonth());
$graph->Add($p1);
$graph->Stroke();
}
- 上一篇:php cli 小技巧
- 下一篇:PHP在线生成二维码
精彩图集
精彩文章






