Home  >  Article  >  php教程  >  php使用Jpgraph绘制饼状图的方法,phpjpgraph绘制饼

php使用Jpgraph绘制饼状图的方法,phpjpgraph绘制饼

WBOY
WBOYOriginal
2016-06-13 09:02:06938browse

php使用Jpgraph绘制饼状图的方法,phpjpgraph绘制饼

本文实例讲述了php使用Jpgraph绘制饼状图的方法。分享给大家供大家参考。具体实现方法如下:

<&#63;php 
include ("src/jpgraph.php"); 
include ("src/jpgraph_pie.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 PiePlot($data); 
$graph->Add($pieplot); 
$graph->Stroke(); 
&#63;>

运行效果如下:

希望本文所述对大家的php程序设计有所帮助。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn