您的位置: 旅游网 > 时尚

资深站长php做饼图的函数a

发布时间:2019-07-14 00:23:20

11:20 来源:互联 :水色皇朝【纠错】人评论

A-A+ 怎么开淘宝店 站优化方法 创业如何获得投资 小米note顶配版评测 最新LOL活动

########p3########/*函数说明$chartdata:数据,是数组元素$chartfontrtcentery+$arcy)$currentcolor);$midpoint=round((($enddegrees-$startdegrees)/2)+$startdegrees);list($arcx$arcy)=circle_point($midpoint$chartdiameter/2);imagefilltoborder($imagefloor($chartcenterx+$arcx)floor($chartcentery+$arcy)$currentcolor$currentcolor);}imagearc($image$chartcenterx$chartcentery$chartdiameter$chartdiameter0360$colorborder);imagefilltoborder($imagefloor($chartcenterx+($chartdiameter/2)+2)$chartcentery$colorborder$colorborder);for($i=0;$i{$currentcolor=$colorslice[$i%(count($colorslice))];$liney=$chartdiameter+20+($i*($chartfontheight+2));imagerectangle($image10$liney20+$chartfontheight$liney+$chartfontheight$colorbody);imagefilltoborder($image12$liney+2$colorbody$currentcolor);imagestring($image$chartfont40+$chartfontheight$liney$chartlabel[$i]:$chartdata[$i]$colortext);}imagegif($image$file);}functionradians($degrees){return($degrees*(pi()/180.0));}functioncircle_point($degrees$diameter){$x=cos(radians($degrees))*($diameter/2);$y=sin(radians($degrees))*($diameter/2);return(array($x$y));}?###########这是一个调用的例子###########include(p3);$chartdiameter=250;$chartfont=5;$d1=10;$d2=20;$d3=30;$d4=40;$d5=50;$chartdata=array($d1$d2$d3$d4$d5);$chartlabel=array(D1D2D3D4D5);$colorbody=array(0xff0xff0xff);$colorborder=array(0x000x000x00);$colortext=array(0xff0xff0xff);$color1=array(0xff0x000x00);$color2=array(0x000xff0x00);$color3=array(0x000x000xff);$color4=array(0xff0xff0x00);$color5=array(0xff0x000xff);$colorslice=array($color1$color2$color3$color4$color5);$file=fbimage($chartdata$chartfont$chartdiameter$chartlabel$colorslice$colorbody$colorborder$colortext$file)?

查看更多相似文章

电脑版微店
微商城开app下载不了
小程序怎么弄
猜你会喜欢的
猜你会喜欢的