《PHP教程:php使用Jpgraph绘制3D饼状图的方法》要点:
本文介绍了PHP教程:php使用Jpgraph绘制3D饼状图的方法,希望对您有用。如果有疑问,可以联系我们。
本文实例讲述了php使用Jpgraph绘制3D饼状图的办法.分享给大家供大家参考.具体实现办法如下:PHP学习
<?php
include ("src/jpgraph.php");
include ("src/jpgraph_pie.php");
include ("src/jpgraph_pie3d.php");
$data = array(19,23,34,38,45,67,71,78,85,87,90,96);
$graph = new PieGraph(400,300);
$graph->SetShadow();
$graph->title->Set("年度收支表");
$graph->title->SetFont(FF_SIMSUN,FS_BOLD);
$pieplot = new PiePlot3D($data); //创建PiePlot3D对象
$pieplot->SetCenter(0.4); //设置饼图中心的位置
$pieplot->SetLegends($gDateLocale->GetShortMonth()); //设置图例
$graph->Add($pieplot);
$graph->Stroke();
?>
运行效果图如下:PHP学习
PHP学习
希望本文所述对大家的php程序设计有所赞助.PHP学习
欢迎参与《PHP教程:php使用Jpgraph绘制3D饼状图的方法》讨论,分享您的想法,维易PHP学院为您提供专业教程。