六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網(wǎng)中心:是一個(gè)免費(fèi)提供流行視頻軟件教程、在線(xiàn)學(xué)習(xí)分享的學(xué)習(xí)平臺(tái)!

php做柱型圖的函數(shù)

[摘要]關(guān)鍵詞:PHP#為了方便起見(jiàn),我又做了一個(gè)函數(shù)來(lái)制作柱型圖/*參數(shù)說(shuō)明:graphdata:百分比數(shù)據(jù)(y軸)label:x軸標(biāo)題data:實(shí)際數(shù)據(jù)(y軸)graphwidth:圖像寬度graphheight:圖像高度graphscale:高度因子(為graphheight/100)graphfo...
關(guān)鍵詞:PHP

#為了方便起見(jiàn),我又做了一個(gè)函數(shù)來(lái)制作柱型圖
/*參數(shù)說(shuō)明:
$graphdata:百分比數(shù)據(jù)(y軸)
$label:x軸標(biāo)題
$data:實(shí)際數(shù)據(jù)(y軸)
$graphwidth:圖像寬度
$graphheight:圖像高度
$graphscale:高度因子(為$graphheight/100)
$graphfont:字體號(hào)
$bg;背景顏色值
$text:文本顏色值
$grid:邊線(xiàn)顏色值
$bar:柱的顏色值
$bz:備注(不支持中文呀)
*/
function timage(
$graphdata,$label,$data,
$graphwidth,$graphheight,$graphscale,$graphfont,
$bg,$text,$grid,$bar,$bz)
{

header("Content-type:image/gif");
$image=imagecreate($graphwidth+50,$graphheight+50);
$bgcolor= imagecolorallocate ($image ,$bg[0],$bg[1],$bg[2]);
$textcolor= imagecolorallocate ($image ,$text[0],$text[1],$text[2]);
$gridcolor=imagecolorallocate ($image ,$grid[0],$grid[1],$grid[2]);
$barcolor=imagecolorallocate ($image ,$bar[0],$bar[1],$bar[2]);
$gridabelwidth=imagefontwidth($graphfont)*3+1;
$gridableheight= imagefontheight ($graphfont);
imageline($image,$gridlabelwidth,0,$gridlabelwidth,$graphheight-1,$gridcolor);
imageline($image,0,$graphheight-1,$graphwidth-1,$graphheight-1,$gridcolor);
for($i=0;$i<$graphheight;$i+=$graphheight/10)
{
imagedashedline ($image,0,$i,$graphwidth-1,$i,$gridcolor);
imagestring($image,$graphfont,0,$i,round(($graphheight-$i)/$graphscale),$textcolor);
}

$barwidth=(($graphwidth-$gridlabelwidth)/count($graphdata))-30;#&iquest;&Oslash;&Ouml;&AElig;&Ouml;ù&micro;&Auml;×&Uuml;&iquest;í&para;&Egrave;
for($i=0;$i {
$bartopx=$gridlabelwidth+(($i+1)*20)+($i*$barwidth);#&iquest;&Oslash;&Ouml;&AElig;&Ouml;ù&iquest;&iquest;×ó&micro;&Auml;&frac34;à&Agrave;&euml;
$barbottomx=$bartopx+$barwidth;
$barbottomy=$graphheight-1;#&iquest;&Oslash;&Ouml;&AElig;&Ouml;ù&micro;&Auml;&Iuml;&Acirc;±&szlig;&frac12;&ccedil;
$bartopy=$barbottomy-($graphdata[$i]*$graphscale);
imagefilledrectangle($image,$bartopx,$bartopy,$barbottomx,$barbottomy,$barcolor);
$labelx1=$bartopx;
$labely1=$bartopy-15;
$labelx2=$bartopx;
$labely2=$graphheight;
imagestring($image,$graphfont,$labelx1,$labely1,"$graphdata[$i]"."%",$textcolor);
imagestring($image,$graphfont,$labelx2,$labely2,"$label[$i]",$textcolor);
imagestringup ($image,$graphfont,$labelx1+10,$labely1-$gridableheight,"$data[$i]",$textcolor);
}
imagestring($image,$graphfont,1,$graphheight+30,$bz,$textcolor);
imagegif ($image);

}
?>


主站蜘蛛池模板: 天啪 | 欧美一级三级 | 日韩精品三级 | 午夜看毛片 | 欧美视频在线播放观看免费福利资源 | 日本大胆欧美人术艺术 | 人与禽交免费网站视频 | 日本在线天堂 | 青草视频在线看 | 四虎成人免费影院网址 | 色成人综合 | 亚洲免费网 | 日韩手机在线观看 | 日韩视频大全 | 欧美亚洲网站 | 日韩三级在线观看视频 | 色日韩在线| 日本高清一区二区三区水蜜桃 | 日韩亚洲制服丝袜中文字幕 | 在线免费福利 | 亚洲大片 | 日本免费不卡视频一区二区三区 | 欧美一级黄色片子 | 手机看片国产欧美日韩高清 | 欧美视频免费看 | 中文字幕日韩在线一区国内 | 日本欧美一区二区三区高清 | 亚洲第一区精品观看 | 亚洲精品在线免费看 | 日本日本在线观看视频 | 欧美天堂久久 | 青青久久久国产线免观 | 三级黄色片免费 | 日本一二三区视频 | 四虎影视国产在线观看精品 | 亚洲国产美女精品久久 | 手机在线观看国产精选免费 | 天天爱天天舔 | 欧美污视频网站 | 欧美一区二区激情三区 | 午夜视频你懂的 |