发布 登录/注册
个人主页
TA还没有准备介绍自己
资源描述<?php
/*
*用jpgraph生成曲线图
*3d图
*/
include_once("lib/jpgraph.php");
include_once("lib/jpgraph_pie.php");
include_once("lib/jpgraph_pie3d.php");
$data=array(18,23,26,27,48,25,49,50,45,23,20,30);//模拟数据
$month=array('北京','上海','广东','天津','河南','河北','浙江','山西','重庆','香港','台湾','其他');
$graph=newPieGraph(600,450);
$graph->SetShadow();
$graph->title->Set("注册人数地区分布");
$pieplot=newPiePlot3D($data);
$graph->title->SetFont(FF_SIMSUN,FS_BOLD);
$graph->legend->SetFont(FF_SIMSUN,FS_BOLD);
$graph->legend->SetPos(0.01,0.2,'right','right');//0.01距左边的偏移0.2距上方的偏移后面两个默认为righttop
$graph->legend->SetColumns(1);//设置图例一列显示
$graph->legend->SetLineSpacing(15);//设置行距
$pieplot->SetCenter(0.4);//设置饼图的中心位置
$pieplot->SetLegends($month);//设置图例
$graph->Add($pieplot);
$graph->Stroke();
?>
qq:雨点网络 2016-08-23 没有更多了~
- 广告联系QQ:3083263680
- 邮箱: support@codeforge.com