亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jpgraph_pie.php

?? asterisk用 的voip記費軟件
?? PHP
?? 第 1 頁 / 共 2 頁
字號:
<?php/*=======================================================================// File:	JPGRAPH_PIE.PHP// Description:	Pie plot extension for JpGraph// Created: 	2001-02-14// Author:	Johan Persson (johanp@aditus.nu)// Ver:		$Id: jpgraph_pie.php,v 1.49.2.19 2004/10/02 06:50:31 aditus Exp $//// License:	This code is released under QPL// Copyright (C) 2001,2002,2003 Johan Persson//========================================================================*/// Defines for PiePlot::SetLabelType()DEFINE("PIE_VALUE_ABS",1);DEFINE("PIE_VALUE_PER",0);DEFINE("PIE_VALUE_PERCENTAGE",0);DEFINE("PIE_VALUE_ADJPERCENTAGE",2);DEFINE("PIE_VALUE_ADJPER",2);//===================================================// CLASS PiePlot// Description: Draws a pie plot//===================================================class PiePlot {    var $posx=0.5,$posy=0.5;    var $radius=0.3;    var $explode_radius=array(),$explode_all=false,$explode_r=20;    var $labels=null, $legends=null;    var $csimtargets=null;  // Array of targets for CSIM    var $csimareas='';		// Generated CSIM text	    var $csimalts=null;		// ALT tags for corresponding target    var $data=null;    var $title;    var $startangle=0;    var $weight=1, $color="black";    var $legend_margin=6,$show_labels=true;    var $themearr = array(	"earth" 	=> array(136,34,40,45,46,62,63,134,74,10,120,136,141,168,180,77,209,218,346,395,89,430),	"pastel" => array(27,415,128,59,66,79,105,110,42,147,152,230,236,240,331,337,405,38),	"water"  => array(8,370,24,40,335,56,213,237,268,14,326,387,10,388),	"sand"   => array(27,168,34,170,19,50,65,72,131,209,46,393));    var $theme="earth";    var $setslicecolors=array();    var $labeltype=0; // Default to percentage    var $pie_border=true,$pie_interior_border=true;    var $value;    var $ishadowcolor='',$ishadowdrop=4;    var $ilabelposadj=1;    var $legendcsimtargets = array();    var $legendcsimalts = array();    var $adjusted_data = array();	//---------------// CONSTRUCTOR    function PiePlot($data) {	$this->data = array_reverse($data);	$this->title = new Text("");	$this->title->SetFont(FF_FONT1,FS_BOLD);	$this->value = new DisplayValue();	$this->value->Show();	$this->value->SetFormat('%.1f%%');    }//---------------// PUBLIC METHODS	    function SetCenter($x,$y=0.5) {	$this->posx = $x;	$this->posy = $y;    }    function SetColor($aColor) {	$this->color = $aColor;    }	    function SetSliceColors($aColors) {	$this->setslicecolors = $aColors;    }	    function SetShadow($aColor='darkgray',$aDropWidth=4) {	$this->ishadowcolor = $aColor;	$this->ishadowdrop = $aDropWidth;    }    function SetCSIMTargets($targets,$alts=null) {	$this->csimtargets=array_reverse($targets);	if( is_array($alts) )	    $this->csimalts=array_reverse($alts);    }	    function GetCSIMareas() {	return $this->csimareas;    }    function AddSliceToCSIM($i,$xc,$yc,$radius,$sa,$ea) {          //Slice number, ellipse centre (x,y), height, width, start angle, end angle	while( $sa > 2*M_PI ) $sa = $sa - 2*M_PI;	while( $ea > 2*M_PI ) $ea = $ea - 2*M_PI;	$sa = 2*M_PI - $sa;	$ea = 2*M_PI - $ea;	//add coordinates of the centre to the map	$coords = "$xc, $yc";	//add coordinates of the first point on the arc to the map	$xp = floor(($radius*cos($ea))+$xc);	$yp = floor($yc-$radius*sin($ea));	$coords.= ", $xp, $yp";		//add coordinates every 0.2 radians	$a=$ea+0.2;	while ($a<$sa) {	    $xp = floor($radius*cos($a)+$xc);	    $yp = floor($yc-$radius*sin($a));	    $coords.= ", $xp, $yp";	    $a += 0.2;	}			//Add the last point on the arc	$xp = floor($radius*cos($sa)+$xc);	$yp = floor($yc-$radius*sin($sa));	$coords.= ", $xp, $yp";	if( !empty($this->csimtargets[$i]) ) {	    $this->csimareas .= "<area shape=\"poly\" coords=\"$coords\" href=\"".		$this->csimtargets[$i]."\"";	    if( !empty($this->csimalts[$i]) ) {		$tmp=sprintf($this->csimalts[$i],$this->data[$i]);		$this->csimareas .= " alt=\"$tmp\" title=\"$tmp\"";	    }	    $this->csimareas .= ">\n";	}    }	    function SetTheme($aTheme) {	if( in_array($aTheme,array_keys($this->themearr)) )	    $this->theme = $aTheme;	else	    JpGraphError::Raise("PiePLot::SetTheme() Unknown theme: $aTheme");    }	    function ExplodeSlice($e,$radius=20) {	if( ! is_integer($e) ) 	    JpGraphError::Raise('Argument to PiePlot::ExplodeSlice() must be an integer');	$this->explode_radius[$e]=$radius;    }    function ExplodeAll($radius=20) {	$this->explode_all=true;	$this->explode_r = $radius;    }    function Explode($aExplodeArr) {	if( !is_array($aExplodeArr) ) {	    JpGraphError::Raise("Argument to PiePlot::Explode() must be an array with integer distances.");	}	$this->explode_radius = $aExplodeArr;    }    function SetStartAngle($aStart) {	if( $aStart < 0 || $aStart > 360 ) {	    JpGraphError::Raise('Slice start angle must be between 0 and 360 degrees.');	}	$this->startangle = 360-$aStart;	$this->startangle *= M_PI/180;    }	    function SetFont($family,$style=FS_NORMAL,$size=10) {		JpGraphError::Raise('PiePlot::SetFont() is deprecated. Use PiePlot->value->SetFont() instead.');    }	    // Size in percentage    function SetSize($aSize) {	if( ($aSize>0 && $aSize<=0.5) || ($aSize>10 && $aSize<1000) )	    $this->radius = $aSize;	else	    JpGraphError::Raise("PiePlot::SetSize() Radius for pie must either be specified as a fraction                                [0, 0.5] of the size of the image or as an absolute size in pixels                                 in the range [10, 1000]");    }	    function SetFontColor($aColor) {	JpGraphError::Raise('PiePlot::SetFontColor() is deprecated. Use PiePlot->value->SetColor() instead.');    }	    // Set label arrays    function SetLegends($aLegend) {	$this->legends = $aLegend;    }    // Set text labels for slices     function SetLabels($aLabels,$aLblPosAdj="auto") {	$this->labels = array_reverse($aLabels);	$this->ilabelposadj=$aLblPosAdj;    }    function SetLabelPos($aLblPosAdj) {	$this->ilabelposadj=$aLblPosAdj;    }	    // Should we display actual value or percentage?    function SetLabelType($t) {	if( $t < 0 || $t > 2 ) 	    JpGraphError::Raise("PiePlot::SetLabelType() Type for pie plots must be 0 or 1 (not $t).");	$this->labeltype=$t;    }    function SetValueType($aType) {	$this->SetLabelType($aType);    }    // Should the circle around a pie plot be displayed    function ShowBorder($exterior=true,$interior=true) {	$this->pie_border = $exterior;	$this->pie_interior_border = $interior;    }	    // Setup the legends    function Legend(&$graph) {	$colors = array_keys($graph->img->rgb->rgb_table);   	sort($colors);	   	$ta=$this->themearr[$this->theme];	   	$n = count($this->data);   	if( $this->setslicecolors==null ) {	    $numcolors=count($ta);	    if( get_class($this)==='pieplot3d' ) {		$ta = array_reverse(array_slice($ta,0,$n));	    }	}   	else {	    $this->setslicecolors = array_slice($this->setslicecolors,0,$n);	    $numcolors=count($this->setslicecolors); 	    if( $graph->pieaa && get_class($this)==='pieplot' ) { 		$this->setslicecolors = array_reverse($this->setslicecolors);	    }	}			$sum=0;	for($i=0; $i < $n; ++$i)	    $sum += $this->data[$i];	// Bail out with error if the sum is 0	if( $sum==0 )	    JpGraphError::Raise("Illegal pie plot. Sum of all data is zero for Pie!");	// Make sure we don't plot more values than data points	// (in case the user added more legends than data points)	$n = min(count($this->legends),count($this->data));	if( $this->legends != "" ) {	    $this->legends = array_reverse(array_slice($this->legends,0,$n));	}	for( $i=$n-1; $i >= 0; --$i ) {	    $l = $this->legends[$i];	    // Replace possible format with actual values	    if( $this->labeltype==0 ) {		$l = sprintf($l,100*$this->data[$i]/$sum);		$alt = sprintf($this->csimalts[$i],$this->data[$i]);	    }	    elseif( $this->labeltype == 1)  {		$l = sprintf($l,$this->data[$i]);		$alt = sprintf($this->csimalts[$i],$this->data[$i]);	    	    }	    else {		$l = sprintf($l,$this->adjusted_data[$i]);		$alt = sprintf($this->csimalts[$i],$this->adjusted_data[$i]);	    }	    					    if( $this->setslicecolors==null ) {		$graph->legend->Add($l,$colors[$ta[$i%$numcolors]],"",0,				    $this->csimtargets[$i],$alt);	    }	    else {		$graph->legend->Add($l,$this->setslicecolors[$i%$numcolors],"",0,				    $this->csimtargets[$i],$alt);	    }	}    }	    // Adjust the rounded percetage value so that the sum of    // of the pie slices are always 100%    // Using the Hare/Niemeyer method    function AdjPercentage($aData,$aPrec=0) {	$mul=100;	if( $aPrec > 0 && $aPrec < 3 ) {	    if( $aPrec == 1 ) 		$mul=1000;		else		    $mul=10000;	}		$tmp = array();	$result = array();	$quote_sum=0;	$n = count($aData) ;	for( $i=0, $sum=0; $i < $n; ++$i )	    $sum+=$aData[$i];	foreach($aData as $index => $value) {	    $tmp_percentage=$value/$sum*$mul;	    $result[$index]=floor($tmp_percentage);	    $tmp[$index]=$tmp_percentage-$result[$index];	    $quote_sum+=$result[$index];	}	if( $quote_sum == $mul) {	    if( $mul > 100 ) {		$tmp = $mul / 100;		for( $i=0; $i < $n; ++$i ) {		    $result[$i] /= $tmp ;		}	    }	    return $result;	}	arsort($tmp,SORT_NUMERIC);	reset($tmp);	for($i=0; $i < $mul-$quote_sum; $i++)	{	    $result[key($tmp)]++;	    next($tmp);	}	if( $mul > 100 ) {	    $tmp = $mul / 100;	    for( $i=0; $i < $n; ++$i ) {		$result[$i] /= $tmp ;	    }	}	return $result;    }    function Stroke(&$img,$aaoption=0) {	// aaoption is used to handle antialias	// aaoption == 0 a normal pie	// aaoption == 1 just the body	// aaoption == 2 just the values	// Explode scaling. If anti anti alias we scale the image	// twice and we also need to scale the exploding distance	$expscale = $aaoption === 1 ? 2 : 1;	if( $this->labeltype == 2 ) {	    // Adjust the data so that it will add up to 100%	    $this->adjusted_data = $this->AdjPercentage($this->data);	}	$colors = array_keys($img->rgb->rgb_table);   	sort($colors);	   	$ta=$this->themearr[$this->theme];		$n = count($this->data);   	   	if( $this->setslicecolors==null ) {	    $numcolors=count($ta);	}   	else {	    // We need to create an array of colors as long as the data	    // since we need to reverse it to get the colors in the right order	    $numcolors=count($this->setslicecolors); 	    if( $n > $numcolors ) {		$i = 2*$numcolors;		while( $n > $i ) {		    $this->setslicecolors = array_merge($this->setslicecolors,$this->setslicecolors);		    $i += $n;		}		$tt = array_slice($this->setslicecolors,0,$n % $numcolors);		$this->setslicecolors = array_merge($this->setslicecolors,$tt);		$this->setslicecolors = array_reverse($this->setslicecolors);	    }	}	// Draw the slices	$sum=0;	for($i=0; $i < $n; ++$i)	    $sum += $this->data[$i];		// Bail out with error if the sum is 0	if( $sum==0 )	    JpGraphError::Raise("Sum of all data is 0 for Pie.");		// Set up the pie-circle	if( $this->radius <= 1 )	    $radius = floor($this->radius*min($img->width,$img->height));	else {	    $radius = $aaoption === 1 ? $this->radius*2 : $this->radius;	}	if( $this->posx <= 1 && $this->posx > 0 )	    $xc = round($this->posx*$img->width);	else	    $xc = $this->posx ;		if( $this->posy <= 1 && $this->posy > 0 )	    $yc = round($this->posy*$img->height);	else	    $yc = $this->posy ;			$n = count($this->data);	if( $this->explode_all )	    for($i=0; $i < $n; ++$i)		$this->explode_radius[$i]=$this->explode_r;	if( $this->ishadowcolor != "" && $aaoption !== 2) {	    $accsum=0;	    $angle2 = $this->startangle;	    $img->SetColor($this->ishadowcolor);	    for($i=0; $sum > 0 && $i < $n; ++$i) {		$j = $n-$i-1;		$d = $this->data[$i];		$angle1 = $angle2;		$accsum += $d;		$angle2 = $this->startangle+2*M_PI*$accsum/$sum;		if( empty($this->explode_radius[$j]) )		    $this->explode_radius[$j]=0;		$la = 2*M_PI - (abs($angle2-$angle1)/2.0+$angle1);		$xcm = $xc + $this->explode_radius[$j]*cos($la)*$expscale;		$ycm = $yc - $this->explode_radius[$j]*sin($la)*$expscale;				$xcm += $this->ishadowdrop*$expscale;		$ycm += $this->ishadowdrop*$expscale;		$img->CakeSlice($xcm,$ycm,$radius,$radius,				$angle1*180/M_PI,$angle2*180/M_PI,$this->ishadowcolor);			    }	}	$accsum=0;	$angle2 = $this->startangle;	$img->SetColor($this->color);	for($i=0; $sum>0 && $i < $n; ++$i) {	    $j = $n-$i-1;	    if( empty($this->explode_radius[$j]) )		$this->explode_radius[$j]=0;	    $d = $this->data[$i];	    $angle1 = $angle2;	    $accsum += $d;	    $angle2 = $this->startangle+2*M_PI*$accsum/$sum;	    $this->la[$i] = 2*M_PI - (abs($angle2-$angle1)/2.0+$angle1);	    if( $d == 0 ) continue;	    if( $this->setslicecolors==null )		$slicecolor=$colors[$ta[$i%$numcolors]];	    else		$slicecolor=$this->setslicecolors[$i%$numcolors];	    if( $this->pie_interior_border && $aaoption===0 )		$img->SetColor($this->color);	    else		$img->SetColor($slicecolor);	    $arccolor = $this->pie_border && $aaoption===0 ? $this->color : "";	    $xcm = $xc + $this->explode_radius[$j]*cos($this->la[$i])*$expscale;	    $ycm = $yc - $this->explode_radius[$j]*sin($this->la[$i])*$expscale;	    if( $aaoption !== 2 ) {		$img->CakeSlice($xcm,$ycm,$radius-1,$radius-1,				$angle1*180/M_PI,$angle2*180/M_PI,$slicecolor,$arccolor);	    }	    if( $this->csimtargets && $aaoption !== 1 ) 		$this->AddSliceToCSIM($i,$xcm,$ycm,$radius,$angle1,$angle2);	}	// Format the titles for each slice	for( $i=0; $i < $n; ++$i) {	    if( $this->labeltype==0 ) {		if( $sum != 0 )		    $l = 100.0*$this->data[$i]/$sum;		else		    $l = 0.0;	    }	    elseif( $this->labeltype==1 ) {		$l = $this->data[$i]*1.0;	    }	    else {		$l = $this->adjusted_data[$i];	    }	    if( isset($this->labels[$i]) && is_string($this->labels[$i]) )		$this->labels[$i]=sprintf($this->labels[$i],$l);	    else		$this->labels[$i]=$l;	}	if( $this->value->show && $aaoption !== 1 ) {	    $this->StrokeAllLabels($img,$xc,$yc,$radius);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
2024国产精品| 成人午夜短视频| 欧美日韩一区在线| 天堂成人国产精品一区| 制服丝袜日韩国产| 国产在线播精品第三| 久久久精品人体av艺术| 99久久免费精品高清特色大片| 国产精品国产三级国产aⅴ入口| 国产成人激情av| 国产日韩欧美一区二区三区乱码| www.亚洲国产| 亚洲午夜免费电影| 日韩一区二区三区观看| 国产精品系列在线观看| 亚洲美女屁股眼交| 欧美一区二区女人| eeuss国产一区二区三区| 亚洲国产一区二区在线播放| 欧美一区三区四区| 成人深夜福利app| 亚欧色一区w666天堂| 亚洲精品一区二区三区蜜桃下载 | 日本麻豆一区二区三区视频| 日韩精品一区二区三区四区视频| 成人一区在线看| 三级不卡在线观看| 国产精品国产成人国产三级| 欧美一区二区视频免费观看| 粉嫩av一区二区三区| 午夜精品一区在线观看| 久久九九影视网| 欧美日韩国产综合一区二区三区| 国产盗摄精品一区二区三区在线| 亚洲成av人综合在线观看| 欧美国产精品v| 日韩一区国产二区欧美三区| 色妹子一区二区| 国内精品伊人久久久久av一坑| 亚洲最色的网站| 中文字幕免费一区| 欧美成人精精品一区二区频| 色综合久久久久久久久| 国产九色sp调教91| 日韩黄色小视频| 一区二区三区在线影院| 国产免费成人在线视频| 日韩欧美视频在线| 精品视频一区 二区 三区| 成人激情免费视频| 极品美女销魂一区二区三区 | 国产亚洲成av人在线观看导航| 欧美网站大全在线观看| www.成人网.com| 国产精品影音先锋| 久久国内精品自在自线400部| 午夜欧美2019年伦理| 自拍偷自拍亚洲精品播放| 久久精品男人的天堂| 337p日本欧洲亚洲大胆精品| 精品久久久久久久人人人人传媒| 欧美精品电影在线播放| 欧美亚洲国产一卡| 欧美日韩综合在线| 欧美性大战久久久久久久蜜臀| 99精品视频在线观看| jlzzjlzz欧美大全| 成人污污视频在线观看| 高清久久久久久| 懂色av一区二区在线播放| 大桥未久av一区二区三区中文| 国产精品自在在线| 久久99九九99精品| 国产伦精品一区二区三区免费| 精品一区二区影视| 国产精品一级黄| www.欧美日韩| 91毛片在线观看| 色狠狠综合天天综合综合| 972aa.com艺术欧美| 色8久久精品久久久久久蜜| 色88888久久久久久影院野外| 91高清视频在线| 欧美久久久久免费| 91精品国产91久久久久久一区二区| 91精品国产综合久久香蕉麻豆| 欧美精品欧美精品系列| 欧美一级黄色片| 国产亚洲午夜高清国产拍精品| 26uuu国产电影一区二区| 欧美国产精品久久| 一区二区三区四区国产精品| 午夜视频一区二区三区| 蜜臀av一区二区三区| 国产高清无密码一区二区三区| 成人白浆超碰人人人人| 在线视频综合导航| 欧美人妇做爰xxxⅹ性高电影 | 制服丝袜亚洲播放| 久久午夜羞羞影院免费观看| 中文字幕一区二区在线播放| 亚洲福利电影网| 激情综合网av| 菠萝蜜视频在线观看一区| 91国产视频在线观看| 91精品久久久久久久91蜜桃| 久久精品亚洲国产奇米99| 最近中文字幕一区二区三区| 亚洲成人黄色影院| 国产福利精品一区二区| 91精品福利在线| 精品国产3级a| 亚洲精品视频一区二区| 蜜臀av性久久久久蜜臀aⅴ| 欧美一区二区免费观在线| 久久久国产一区二区三区四区小说| 成人欧美一区二区三区视频网页| 日本亚洲欧美天堂免费| 99国产一区二区三精品乱码| 91精品国产欧美一区二区| 国产校园另类小说区| 亚洲综合久久久| 国产高清精品网站| 欧美日韩国产综合草草| 中文字幕一区二区三区av | 美女一区二区三区| 99久久婷婷国产综合精品| 欧美va亚洲va香蕉在线| 亚洲天天做日日做天天谢日日欢| 久久国产尿小便嘘嘘| 欧美视频中文字幕| 国产精品成人网| 国产一区二区免费看| 欧美美女bb生活片| 亚洲视频一区二区在线观看| 狠狠色丁香婷婷综合| 91精品国产色综合久久不卡电影| 国产精品灌醉下药二区| 国产精品一区二区三区乱码| 538在线一区二区精品国产| 亚洲免费观看高清完整版在线观看| 国内精品视频666| 欧美老肥妇做.爰bbww| 亚洲欧美日韩国产一区二区三区 | 色94色欧美sute亚洲线路一ni| 欧美精品一区二区三区蜜桃| 偷拍一区二区三区| 一道本成人在线| 亚洲私人黄色宅男| 成人免费视频一区| 国产偷国产偷精品高清尤物| 激情丁香综合五月| 欧美成人a在线| 久久精品国产免费| 91精品国产色综合久久ai换脸| 亚洲国产精品久久不卡毛片| 日本高清免费不卡视频| 亚洲色大成网站www久久九九| 9l国产精品久久久久麻豆| 欧美经典一区二区| 国产aⅴ综合色| 国产精品视频yy9299一区| 大美女一区二区三区| 欧美国产一区在线| 成人手机在线视频| 国产精品久久久久婷婷二区次 | 在线免费观看不卡av| 亚洲精品第1页| 在线观看不卡一区| 亚洲影院理伦片| 欧美日韩不卡在线| 男男视频亚洲欧美| 日韩一区二区三区视频| 激情综合网激情| 国产精品色哟哟网站| 色呦呦国产精品| 视频一区视频二区中文| 欧美一级二级三级蜜桃| 国产在线播精品第三| 欧美国产在线观看| 色哟哟一区二区在线观看| 久久国产欧美日韩精品| 久久久久国产精品厨房| 成人丝袜18视频在线观看| 亚洲精品国产无套在线观| 欧美精品三级在线观看| 蜜桃精品在线观看| 久久亚洲综合色一区二区三区| 国产丶欧美丶日本不卡视频| 综合自拍亚洲综合图不卡区| 欧美视频一区二区三区在线观看| 午夜精品福利一区二区三区av | 日韩一区欧美小说| 欧美日本在线一区| 国精品**一区二区三区在线蜜桃| 中文字幕一区二区三区视频| 欧美剧情片在线观看| 国产91综合网| 亚洲一区二区三区激情| 精品av久久707|