//如果要轉載本文請注明出處,免的出現版權紛爭,我不喜歡看到那種轉載了我的作品卻不注明出處的人 Seven{See7di#Gmail.com}
<?php
//转载请标注:制作人Seven(QQ9256114)
//参数含义(数组,横坐标,纵坐标,图表的宽度,图表的高度,图表标题,单位)
Function table2($stat_array,$table_left,$table_top,$all_width,$all_height,$table_title,$unit){
$num =Count($stat_array);
For($i=0;$i<$num;$i++){
Static $allvalues=0;
$allvalues = $allvalues+$stat_array[$i][0];
}
$pie=Array();
For($i=0;$i<$num;$i++){
Static $k=0;
$pie[$i]=Round($stat_array[$i][0]/$allvalues,2);
$k=$k+$pie[$i];
}
$pie[$num]=Round((1-$k),2);
Echo "<v:shapetype id='Cake_3D' coordsize='21600,21600' o:spt='95' adj='11796480,5400' path='al10800,10800@0@0@2@14,10800,10800,10800,10800@3@15xe'></v:shapetype>";
Echo "<v:shapetype id='3dtxt' coordsize='21600,21600' o:spt='136' adj='10800' path='m@7,l@8,m@5,21600l@6,21600e'> ";
Echo "<v:path textpathok='t' o:connecttype='custom' o:connectlocs='@9,0;@10,10800;@11,21600;@12,10800' o:connectangles='270,180,90,0'/>";
Echo "<v:textpath on='t' fitshape='t'/>";
Echo "<o:lock v:ext='edit' text='t' shapetype='t'/>";
Echo "</v:shapetype>";
Echo "<v:rect id='background' style='position:absolute;left:".$table_left."px;top:".$table_top."px;WIDTH:".$all_width."px;HEIGHT:".$all_height."px;' fillcolor='#EFEFEF' strokecolor='gray'>";
Echo "<v:shadow on='t' type='single' color='silver' offset='4pt,4pt'/>";
Echo "</v:rect>";
Echo "<v:group ID='table' style='position:absolute;left:".$table_left."px;top:".$table_top."px;WIDTH:"