网学网ASP编辑为广大网友搜集整理了:asp生成三维饼图的函数绩等信息,祝愿广大网友取得需要的信息,参考学习。
为方便生成三维饼图函数,我收集了asp下的生成三维饼图的函数的代码,方便大家特殊情况下的使用
复制代码 代码如下:
<%
''参数含义(数组,横坐标,纵坐标,图表的宽度,图表的高度,图表标题,单位)
function table2(stat_array,table_left,table_top,all_width,all_height,table_title,unit)
dim bg_color(10),pie(10)
bg_color(1)="#ff1919"
bg_color(2)="#ffff19"
bg_color(3)="#1919ff"
bg_color(4)="#19ff19"
bg_color(5)="#fc0"
bg_color(6)="#3cc"
bg_color(7)="#ff19ff"
bg_color(8)="#993300"
bg_color(9)="#f60"
bg_color(10)="#ff8c19"
num =ubound(stat_array,1)
allvalues=0
for i=1 to num
allvalues = allvalues+stat_array(i,1)
next
k=0
for i=1 to num-1
pie(i)=formatnumber(stat_array(i,1)/allvalues,4,-1)
k=k+pie(i)
next
pie(num)=formatnumber((1-k),4,-1)
response.Write "<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>"
response.Write "<v:shapetype id=''3dtxt'' coordsize=''21600,21600'' o:spt=''136'' adj=''10800'' path=''m@7,l@8,m@5,21600l@6,21600e''> "
response.Write " <v:path textpathok=''t'' o:connecttype=''custom'' o:connectlocs=''@9,0;@10,10800;@11,21600;@12,10800'' o:connectangles=''270,180,90,0''/>"
response.Write " <v:textpath on=''t'' fitshape=''t''/>"
response.Write " <o:lock v:ext=''edit'' text=''t'' shapetype=''t''/>"
response.Write "</v:shapetype>"
response.Write "<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''>"
response.Write " <v:shadow on=''t'' type=''single'' color=''silver'' offset=''4pt,4pt''/>"
response.Write "</v:rect>"
response.Write "<v:group ID=''table'' style=''position:absolute;left:"&table_left&"px;top:"&table_top&"px;WIDTH:"&all_width&"px;HEIGHT:"&all_height&"px;'' coordsize = ''21000,11500''>"
response.Write " <v:Rect style=''position:relative;left:500;top:200;width:20000;height:800''filled=''false'' stroked=''false''>"
response.Write " <v:TextBox inset=''0pt,0pt,0pt,0pt''>"
response.Write " <table width=''100%'' border=''0'' align=''center'' cellspacing=''0''>"
response.Write " <tr>"
response.Write " <td align=''center'' valign=''middle''><div style=''font-size:15pt; font-family:黑体;''><B>"&table_title&"</B></div></td>"
response.Write " </tr>"
response.Write " </table>"
response.Write " </v:TextBox>"
response.Write " </v:Rect> "
response.Write " <v:rect id=''back'' style=''position:relative;left:500;top:1000;width:20000; height:10000;'' onmou