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

        當前位置:雨林木風下載站 > 技術開發教程 > 詳細頁面

        如何用php作線形圖的函數

        如何用php作線形圖的函數

        更新時間:2022-04-27 文章作者:未知 信息來源:網絡 閱讀次數:

        很高興大家對PHP如此的情有獨鐘!
        下面就給大家介紹php作線形圖的函數:

        /*
        函數說明
        $data:y軸數據(數組)
        $graphdata:y軸數據--百分比(數組)
        $label:x軸數據(數組)
        $height:圖像高度
        $width:圖像寬度
        $font:字號
        $dot:決定點的大小
        $bg:背景色
        $line :線色
        $text :文本色
        $dotcolor:點色
        $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);
        }
        ?>


        【本文版權歸作者與奧索網共同擁有,如需轉載,請注明作者及出處】    

        溫馨提示:喜歡本站的話,請收藏一下本站!

        本類教程下載

        系統下載排行

        主站蜘蛛池模板: 亚洲婷婷五月综合狠狠爱| 国产三级免费电影| 久久久亚洲AV波多野结衣| 很黄很污的网站免费| 国产亚洲综合一区柠檬导航| 国内永久免费crm系统z在线| 亚洲一级Av无码毛片久久精品| 三年片在线观看免费观看大全中国| 免费一级国产生活片| 欧洲精品码一区二区三区免费看| 亚洲第一永久AV网站久久精品男人的天堂AV | 亚洲精品国产精品乱码不卞| 一级毛片在线完整免费观看| 久久精品国产精品亚洲下载| 日本高清不卡aⅴ免费网站| 亚洲国产高清视频| 国内精自视频品线六区免费| 亚洲熟妇成人精品一区| 亚洲av午夜精品一区二区三区| 国产精品成人啪精品视频免费| 久久精品国产亚洲av四虎| 18级成人毛片免费观看| 亚洲人成欧美中文字幕| 五月婷婷亚洲综合| 日韩电影免费在线观看网站| 亚洲欧洲日本精品| 日本不卡免费新一二三区| 精品久久久久久无码免费| 亚洲福利电影一区二区?| 免费看男女下面日出水视频| 18禁超污无遮挡无码免费网站| 亚洲无圣光一区二区| 亚洲国产精品成人久久蜜臀 | 四虎在线最新永久免费| 亚洲中文字幕久久精品无码A | 久久被窝电影亚洲爽爽爽| 精品国产无限资源免费观看| 老司机午夜在线视频免费观| 亚洲国产综合专区电影在线| 男女啪啪永久免费观看网站| 美丽姑娘免费观看在线观看中文版|