• <label id="pxtpz"><meter id="pxtpz"></meter></label>
      1. <span id="pxtpz"><optgroup id="pxtpz"></optgroup></span>

        當(dāng)前位置:雨林木風(fēng)下載站 > 技術(shù)開發(fā)教程 > 詳細(xì)頁(yè)面

        如何用php作線形圖的函數(shù)

        如何用php作線形圖的函數(shù)

        更新時(shí)間:2022-04-27 文章作者:未知 信息來(lái)源:網(wǎng)絡(luò) 閱讀次數(shù):

        很高興大家對(duì)PHP如此的情有獨(dú)鐘!
        下面就給大家介紹php作線形圖的函數(shù):

        /*
        函數(shù)說(shuō)明
        $data:y軸數(shù)據(jù)(數(shù)組)
        $graphdata:y軸數(shù)據(jù)--百分比(數(shù)組)
        $label:x軸數(shù)據(jù)(數(shù)組)
        $height:圖像高度
        $width:圖像寬度
        $font:字號(hào)
        $dot:決定點(diǎn)的大小
        $bg:背景色
        $line :線色
        $text :文本色
        $dotcolor:點(diǎn)色
        $file:輸出圖像文件名
        */

        function qximage($data ,
        $graphdata,
        $label ,
        $height,
        $width ,
        $font,
        $dot,
        $bg,
        $line,
        $text,
        $dotcolor,
        $file)
        {
        $jc=$height/100;
        $fontwidth= imagefontwidth ($font);
        $fontheight=imagefontheight($font);

        $image= imagecreate ($width,$height+20);
        $bg= imagecolorallocate($image ,$bg[0],$bg[1],$bg[2]);
        $line=imagecolorallocate($image ,$line[0],$line[1],$line[2]);
        $text=imagecolorallocate($image ,$text[0],$text[1],$text[2]);
        $dotcolor=imagecolorallocate($image ,$dotcolor[0],$dotcolor[1],$$dotcolor[2]);
        imageline ($image,0,0,0,$height,$line);
        imageline($image,0,$height,$width,$height,$line);
        for ($i=1;$i<11;$i++)
        {
        imagedashedline($image,0,$height - $jc*$i*10 ,$width ,$height -$jc*$i*10 ,$line );
        imagestring ($image,$font,0,$height-$jc*$i*10,$i*10,$text);
        }
        for ($i=0;$i {
        #echo $tmp."
        ";
        $x1=(($width-50)/count($data))*($i)+40;
        #echo $x1 ."
        ";
        $y1=$height-$graphdata[$i]*$jc;
        $x2=$x1;
        $y2=$y1+$graphdata[$i]*$jc;
        #echo $y1."
        ";
        imagestring($image,$font,$x1,$y1-2*$fontheight,$graphdata[$i]."%(".$data[$i].")",$text);
        imagearc ($image,$x1 ,$y1,$dot,$dot,0,360,$dotcolor);
        imagefilltoborder ($image,$x1,$y1,$dotcolor,$dotcolor);
        imagestring ($image,$font,$x1,$y2,$label[$i],$text);
        if ($i>0)
        {
        imageline($image,$tmpx1,$tmpy1,$x1,$y1,$line);
        }
        $tmpx1=$x1;$tmpy1=$y1;
        }
        imagegif ($image,$file);
        }
        ?>


        【本文版權(quán)歸作者與奧索網(wǎng)共同擁有,如需轉(zhuǎn)載,請(qǐng)注明作者及出處】    

        溫馨提示:喜歡本站的話,請(qǐng)收藏一下本站!

        本類教程下載

        系統(tǒng)下載排行

        主站蜘蛛池模板: 亚洲AV无码日韩AV无码导航 | 亚洲AV无码久久久久网站蜜桃| jyzzjyzz国产免费观看| 亚洲av日韩av欧v在线天堂| 亚洲国产午夜精品理论片在线播放 | 亚洲AV无码乱码国产麻豆| a毛看片免费观看视频| 国产V亚洲V天堂无码| 中国一级特黄的片子免费 | 两个人www免费高清视频| 亚洲国产精品VA在线看黑人| 美女视频黄a视频全免费网站色窝| 亚洲AV无码第一区二区三区 | 亚洲1区2区3区精华液| 国产真人无遮挡作爱免费视频| 四虎亚洲精品高清在线观看| 四虎影视永久免费观看网址| 亚洲av成人一区二区三区在线播放| 免费无码又爽又高潮视频| 美女羞羞喷液视频免费| 亚洲中文字幕无码中文字在线| 污污网站免费观看| 亚洲人成在线精品| 国产精品久久香蕉免费播放| 三年在线观看免费观看完整版中文| 亚洲欧洲免费视频| 大陆一级毛片免费视频观看| 美女被爆羞羞网站在免费观看| 亚洲精品国产精品乱码视色| 麻豆视频免费观看| 阿v免费在线观看| 亚洲AV日韩AV永久无码绿巨人 | 亚洲国产韩国一区二区| a毛片久久免费观看| 亚洲高清视频免费| 国产精品无码素人福利免费| 老司机69精品成免费视频| 亚洲制服丝袜中文字幕| 亚洲国产精品无码久久青草| 91免费国产精品| 黄页网站在线视频免费|