<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>代码收藏 &#187; 图表 柱状图</title> <atom:link href="http://code.9enjoy.com/tag/%e5%9b%be%e8%a1%a8-%e6%9f%b1%e7%8a%b6%e5%9b%be/feed/" rel="self" type="application/rss+xml" /><link>http://code.9enjoy.com</link> <description>收集网站开发时常用到的代码(asp,php,js等)，以函数为主</description> <lastBuildDate>Mon, 24 Jan 2011 14:23:49 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.1</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>纯ASP代码生成图表函数1——柱状图</title><link>http://code.9enjoy.com/asp/%e7%ba%afasp%e4%bb%a3%e7%a0%81%e7%94%9f%e6%88%90%e5%9b%be%e8%a1%a8%e5%87%bd%e6%95%b01%e2%80%94%e2%80%94%e6%9f%b1%e7%8a%b6%e5%9b%be/</link> <comments>http://code.9enjoy.com/asp/%e7%ba%afasp%e4%bb%a3%e7%a0%81%e7%94%9f%e6%88%90%e5%9b%be%e8%a1%a8%e5%87%bd%e6%95%b01%e2%80%94%e2%80%94%e6%9f%b1%e7%8a%b6%e5%9b%be/#comments</comments> <pubDate>Fri, 06 Jun 2008 17:48:11 +0000</pubDate> <dc:creator>enjoy</dc:creator> <category><![CDATA[asp]]></category> <category><![CDATA[图表 柱状图]]></category><guid
isPermaLink="false">http://code.itlearner.com/?p=41</guid> <description><![CDATA[<%<br/>function table1(total,table_x,table_y,thickness,table_width,all_width,all_height,table_type)<br/>'参数含义(传递的数组，横坐标，纵坐标，柱子的厚度，柱子的宽度，图表的宽度，图表的高度,图表的类型)<br/>'纯ASP代码生成图表函数1——柱状图<br/>'作者：龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@sina.com Email:passwordgm@sina.com<br/>'本人非常愿意和ASP,VML,FLASH的爱好者在HTTP://topclouds.126.com进行交流和探讨<br/>...
]]></description> <content:encoded><![CDATA[<p><%<br/>function table1(total,table_x,table_y,thickness,table_width,all_width,all_height,table_type)<br/>&#8216;参数含义(传递的数组，横坐标，纵坐标，柱子的厚度，柱子的宽度，图表的宽度，图表的高度,图表的类型)<br/>&#8216;纯ASP代码生成图表函数1——柱状图<br/>&#8216;作者：龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@sina.com Email:passwordgm@sina.com<br/>&#8216;本人非常愿意和ASP,VML,FLASH的爱好者在HTTP://topclouds.126.com进行交流和探讨<br/>&#8216;版本2.0 最后修改日期 2003-7-22<br/>&#8216;非常感谢您使用这个函数，请您使用和转载时保留版权信息，这是对作者工作的最好的尊重。<br/>dim tb_color(7,2)<br/>tb_color(1,1)=&#8221;#d1ffd1&#8243;<br/>tb_color(2,1)=&#8221;#ffbbbb&#8221;<br/>tb_color(3,1)=&#8221;#ffe3bb&#8221;<br/>tb_color(4,1)=&#8221;#cff4f3&#8243;<br/>tb_color(5,1)=&#8221;#d9d9e5&#8243;<br/>tb_color(6,1)=&#8221;#ffc7ab&#8221;<br/>tb_color(7,1)=&#8221;#ecffb7&#8243;<br/><br/>tb_color(1,2)=&#8221;#00ff00&#8243;<br/>tb_color(2,2)=&#8221;#ff0000&#8243;<br/>tb_color(3,2)=&#8221;#ff9900&#8243;<br/>tb_color(4,2)=&#8221;#33cccc&#8221;<br/>tb_color(5,2)=&#8221;#666699&#8243;<br/>tb_color(6,2)=&#8221;#993300&#8243;<br/>tb_color(7,2)=&#8221;#99cc00&#8243;<br/><br/>line_color=&#8221;#69f&#8221;<br/>left_width=70<br/>length=thickness/2<br/>total_no=ubound(total,1)<br/><br/>temp1=0<br/>for i=1 to total_no<br/>if temp1<total(i,1) then temp1=total(i,1)<br/>next<br/>temp1=int(temp1)<br/>if temp1>9 then<br/>temp2=mid(cstr(temp1),2,1)<br/>if temp2>4 then <br/> temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+1)*10^(len(cstr(temp1))-1)<br/>else<br/> temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+0.5)*10^(len(cstr(temp1))-1)<br/>end if<br/>else<br/>if temp1>4 then temp3=10 else temp3=5<br/>end if<br/>temp4=temp3<br/>response.write &#8220;<!--[if gte vml 1]><v:rect id='_x0000_s1027' alt='' style='position:absolute;left:"&#038;table_x+left_width&"px;top:"&#038;table_y&"px;width:"&#038;all_width&"px;height:"&#038;all_height&"px;z-index:-1' fillcolor='#9cf' stroked='f'><v:fill rotate='t' angle='-45' focus='100%' type='gradient'/></v:rect><![endif]-->&#8220;<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width&#038;"px,"&#038;table_y+all_height&#038;"px' to='"&#038;table_x+all_width+left_width&#038;"px,"&#038;table_y+all_height&#038;"px'/><![endif]-->&#8220;<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width&#038;"px,"&#038;table_y&#038;"px' to='"&#038;table_x+left_width&#038;"px,"&#038;table_y+all_height&#038;"px'/><![endif]-->&#8220;<br/><br/>select case table_type<br/>case &#8220;A&#8221;<br/>table_space=(all_width-table_width*total_no)/total_no<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width+length&#038;"px,"&#038;table_y&#038;"px' to='"&#038;table_x+left_width+length&#038;"px,"&#038;table_y+all_height-length&#038;"px' strokecolor='"&#038;line_color&#038;"'/><![endif]-->&#8220;<br/>for i=0 to all_height-1 step all_height/5<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width&#038;"px,"&#038;table_y+all_height-length-i&#038;"px' to='"&#038;table_x+left_width+length&#038;"px,"&#038;table_y+all_height-i&#038;"px' strokecolor='"&#038;line_color&#038;"'/><![endif]-->&#8220;<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width+length&#038;"px,"&#038;table_y+all_height-length-i&#038;"px' to='"&#038;table_x+all_width+left_width&#038;"px,"&#038;table_y+all_height-length-i&#038;"px' strokecolor='"&#038;line_color&#038;"'/><![endif]-->&#8220;<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+(left_width-15)&#038;"px,"&#038;table_y+i&#038;"px' to='"&#038;table_x+left_width&#038;"px,"&#038;table_y+i&#038;"px'/><![endif]-->&#8220;<br/>response.write &#8220;<!--[if gte vml 1]>&#8220;<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x&"px;top:"&#038;table_y+i&"px;width:"&#038;left_width&"px;height:18px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='right'>&#8220;&#038;temp4&#038;&#8221;</td></tr></table><p></v:textbox></v:shape><![endif]-->&#8220;<br/>temp4=temp4-temp3/5<br/>next<br/>for i=1 to total_no<br/>temp_space=table_x+left_width+table_space/2+table_space*(i-1)+table_width*(i-1)<br/>response.write &#8220;<v:rect id='_x0000_s1025' alt='' style='position:absolute;left:"<br/>response.write temp_space<br/>response.write &#8220;px;top:&#8221;<br/>response.write table_y+all_height*(1-(total(i,1)/temp3))<br/>response.write &#8220;px;width:&#8221;&#038;table_width&#038;&#8221;px;height:&#8221;&#038;all_height*(total(i,1)/temp3)&#038;&#8221;px;z-index:1&#8242; fillcolor=&#8217;&#8221;&#038;tb_color(i,2)&#038;&#8221;&#8216;>&#8221;<br/>response.write &#8220;<v:fill color2='"&#038;tb_color(i,1)&#038;"' rotate='t' type='gradient'/>&#8220;<br/>response.write &#8220;<o:extrusion v:ext='view' backdepth='"&#038;thickness&#038;"pt' color='"&#038;tb_color(i,2)&#038;"' on='t'/>&#8220;<br/>response.write &#8220;</v:rect>&#8220;<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;temp_space&"px;top:"&#038;table_y+all_height*(1-(total(i,1)/temp3))-table_width&"px;width:"&#038;table_space+15&"px;height:18px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='center'>&#8220;&#038;total(i,1)&#038;&#8221;</td></tr></table><p></v:textbox></v:shape>&#8220;<br/><br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;temp_space-table_space/2&"px;top:"&#038;table_y+all_height+1&"px;width:"&#038;table_space+table_width&"px;height:18px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='center'>&#8220;&#038;total(i,2)&#038;&#8221;</td></tr></table><p></v:textbox></v:shape>&#8220;<br/>next<br/>Case &#8220;B&#8221;<br/>table_space=(all_height-table_width*total_no)/total_no<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width+length&#038;"px,"&#038;table_y+all_height-length&#038;"px' to='"&#038;table_x+left_width+all_width&#038;"px,"&#038;table_y+all_height-length&#038;"px' strokecolor='"&#038;line_color&#038;"'/><![endif]-->&#8220;<br/>for i=0 to all_width-1 step all_width/5<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width+i&#038;"px,"&#038;table_y+all_height-length&#038;"px' to='"&#038;table_x+left_width+length+i&#038;"px,"&#038;table_y+all_height&#038;"px' strokecolor='"&#038;line_color&#038;"'/><![endif]-->&#8220;<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width+length+i&#038;"px,"&#038;table_y+all_height-length&#038;"px' to='"&#038;table_x+left_width+length+i&#038;"px,"&#038;table_y&#038;"px' strokecolor='"&#038;line_color&#038;"'/><![endif]-->&#8220;<br/>response.write &#8220;<!--[if gte vml 1]><v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width+i+all_width/5&#038;"px,"&#038;table_y+all_height&#038;"px' to='"&#038;table_x+left_width+i+all_width/5&#038;"px,"&#038;table_y+all_height+15&#038;"px'/><![endif]-->&#8220;<br/>response.write &#8220;<!--[if gte vml 1]>&#8220;<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x+left_width+i+all_width/5-left_width&"px;top:"&#038;table_y+all_height&"px;width:"&#038;left_width&"px;height:18px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='right'>&#8220;&#038;temp4&#038;&#8221;</td></tr></table><p></v:textbox></v:shape><![endif]-->&#8220;<br/>temp4=temp4-temp3/5<br/>next<br/><br/>for i=1 to total_no<br/>temp_space=table_space/2+table_space*(i-1)+table_width*(i-1)<br/>response.write &#8220;<v:rect id='_x0000_s1025' alt='' style='position:absolute;left:"<br/>response.write table_x+left_width<br/>response.write &#8220;px;top:&#8221;<br/>response.write table_y+temp_space<br/>response.write &#8220;px;width:&#8221;&#038;all_width*(total(i,1)/temp3)&#038;&#8221;px;height:&#8221;&#038;table_width&#038;&#8221;px;z-index:1&#8242; fillcolor=&#8217;&#8221;&#038;tb_color(i,2)&#038;&#8221;&#8216;>&#8221;<br/><br
/> response.write &#8220;<v:fill color2='"&#038;tb_color(i,1)&#038;"' rotate='t' angle='-90' focus='100%' type='gradient'/>&#8220;<br/>response.write &#8220;<o:extrusion v:ext='view' backdepth='"&#038;thickness&#038;"pt' color='"&#038;tb_color(i,2)&#038;"' on='t'/>&#8220;<br/>response.write &#8220;</v:rect>&#8220;<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x+left_width+all_width*(total(i,1)/temp3)+thickness/2&"px;top:"&#038;table_y+temp_space&"px;width:"&#038;table_space+15&"px;height:18px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='center'>&#8220;&#038;total(i,1)&#038;&#8221;</td></tr></table><p></v:textbox></v:shape>&#8220;<br/><br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x&"px;top:"&#038;table_y+temp_space&"px;width:"&#038;left_width&"px;height:18px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='right'>&#8220;&#038;total(i,2)&#038;&#8221;</td></tr></table><p></v:textbox></v:shape>&#8220;<br/>next<br/>case else<br/>end select<br/><br/>end function<br/>%><br/><br/> <br/><br/><%<br/>function table2(total,table_x,table_y,all_width,all_height,line_no)<br/>&#8216;参数含义(传递的数组，横坐标，纵坐标，图表的宽度，图表的高度,折线条数)<br/>&#8216;纯ASP代码生成图表函数2——折线图<br/>&#8216;作者：龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@sina.com Email:passwordgm@sina.com<br/>&#8216;本人非常愿意和ASP,VML,FLASH的爱好者在HTTP://topclouds.126.com进行交流和探讨<br/>&#8216;版本1.0 最后修改日期 2003-8-11<br/>&#8216;非常感谢您使用这个函数，请您使用和转载时保留版权信息，这是对作者工作的最好的尊重。<br/><br/>line_color=&#8221;#69f&#8221;<br/>left_width=70<br/>total_no=ubound(total,1)<br/><br/>temp1=0<br/>for i=1 to total_no<br/>for j=1 to line_no<br/> if temp1<total(i,j) then temp1=total(i,j)<br/>next<br/>next<br/>temp1=int(temp1)<br/>if temp1>9 then<br/>temp2=mid(cstr(temp1),2,1)<br/>if temp2>4 then <br/> temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+1)*10^(len(cstr(temp1))-1)<br/>else<br/> temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+0.5)*10^(len(cstr(temp1))-1)<br/>end if<br/>else<br/>if temp1>4 then temp3=10 else temp3=5<br/>end if<br/>temp4=temp3<br/>response.write &#8220;<v:rect id='_x0000_s1027' alt='' style='position:absolute;left:"&#038;table_x+left_width&"px;top:"&#038;table_y&"px;width:"&#038;all_width&"px;height:"&#038;all_height&"px;z-index:-1' fillcolor='#9cf' stroked='f'><v:fill rotate='t' angle='-45' focus='100%' type='gradient'/></v:rect>&#8220;<br/>for i=0 to all_height-1 step all_height/5<br/>response.write &#8220;<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width+length&#038;"px,"&#038;table_y+all_height-length-i&#038;"px' to='"&#038;table_x+all_width+left_width&#038;"px,"&#038;table_y+all_height-length-i&#038;"px' strokecolor='"&#038;line_color&#038;"'/>&#8220;<br/>response.write &#8220;<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+(left_width-15)&#038;"px,"&#038;table_y+i&#038;"px' to='"&#038;table_x+left_width&#038;"px,"&#038;table_y+i&#038;"px'/>&#8220;<br/>response.write &#8220;&#8221;<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x&"px;top:"&#038;table_y+i&"px;width:"&#038;left_width&"px;height:18px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='right'>&#8220;&#038;temp4&#038;&#8221;</td></tr></table><p></v:textbox></v:shape>&#8220;<br/>temp4=temp4-temp3/5<br/>next<br/>response.write &#8220;<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width&#038;"px,"&#038;table_y+all_height&#038;"px' to='"&#038;table_x+all_width+left_width&#038;"px,"&#038;table_y+all_height&#038;"px'/>&#8220;<br/>response.write &#8220;<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width&#038;"px,"&#038;table_y&#038;"px' to='"&#038;table_x+left_width&#038;"px,"&#038;table_y+all_height&#038;"px'/>&#8220;<br/><br/>dim line_code<br/>redim line_code(line_no,5)<br/>for i=1 to line_no<br/>line_temp=split(total(0,i),&#8221;,&#8221;)<br/>line_code(i,1)=line_temp(0)<br/>line_code(i,2)=line_temp(1)<br/>line_code(i,3)=line_temp(2)<br/>line_code(i,4)=line_temp(3)<br/>line_code(i,5)=line_temp(4)<br/>next<br/>for j=1 to line_no<br/>for i=1 to total_no-1<br/> x1=table_x+left_width+all_width*(i-1)/total_no<br/> y1=table_y+(temp3-total(i,j))*(all_height/temp3)<br/> x2=table_x+left_width+all_width*i/total_no<br/> y2=table_y+(temp3-total(i+1,j))*(all_height/temp3)<br/> response.write &#8220;<v:line id=""_x0000_s1025"" alt="""" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="""&#038;x1&#038;"px,"&#038;y1&#038;"px"" to="""&#038;x2&#038;"px,"&#038;y2&#038;"px"" coordsize=""21600,21600"" strokecolor="""&#038;line_code(j,1)&#038;""" strokeweight="""&#038;line_code(j,2)&#038;""">&#8220;<br/> select case line_code(j,3)<br/> case 1<br/> case 2<br/> response.write &#8220;<v:stroke dashstyle='1 1'/>&#8220;<br/> case 3<br/> response.write &#8220;<v:stroke dashstyle='dash'/>&#8220;<br/> case 4<br/> response.write &#8220;<v:stroke dashstyle='dashDot'/>&#8220;<br/> case 5<br/> response.write &#8220;<v:stroke dashstyle='longDash'/>&#8220;<br/> case 6<br/> response.write &#8220;<v:stroke dashstyle='longDashDot'/>&#8220;<br/> case 7<br/> response.write &#8220;<v:stroke dashstyle='longDashDotDot'/>&#8220;<br/> case else<br/> end select<br/> response.write &#8220;</v:line>&#8220;&#038;CHR(13)<br/> select case line_code(j,4)<br/> case 1<br/> case 2<br/> response.write &#8220;<v:rect id=""_x0000_s1027"" style='position:absolute;left:"&#038;x1-2&"px;top:"&#038;y1-2&"px;width:4px;height:4px; z-index:2' fillcolor="""&#038;line_code(j,1)&#038;""" strokecolor="""&#038;line_code(j,1)&#038;"""/>&#8220;&#038;CHR(13)<br/> case 3<br/> response.write &#8220;<v:oval id=""_x0000_s1026"" style='position:absolute;left:"&#038;x1-2&"px;top:"&#038;y1-2&"px;width:4px;height:4px;z-index:1' fillcolor="""&#038;line_code(j,1)&#038;""" strokecolor="""&#038;line_code(j,1)&#038;"""/>&#8220;&#038;CHR(13)<br/> end select<br/>next<br/> select case line_code(j,4)<br/> case 1<br/> case 2<br/> response.write &#8220;<v:rect id=""_x0000_s1027"" style='position:absolute;left:"&#038;x2-2&"px;top:"&#038;y2-2&"px;width:4px;height:4px; z-index:2' fillcolor="""&#038;line_code(j,1)&#038;""" strokecolor="""&#038;line_code(j,1)&#038;"""/>&#8220;&#038;CHR(13)<br/> case 3<br/> response.write &#8220;<v:oval id=""_x0000_s1026"" style='position:absolute;left:"&#038;x2-2&"px;top:"&#038;y2-2&"px;width:4px;height:4px;z-index:1' fillcolor="""&#038;line_code(j,1)&#038;""" strokecolor="""&#038;line_code(j,1)&#038;"""/>&#8220;&#038;CHR(13)<br/> end select<br/>next<br/><br/>for i=1 to total_no<br/>response.write &#8220;<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&#038;table_x+left_width+all_width*(i-1)/total_no&#038;"px,"&#038;table_y+all_height&#038;"px' to='"&#038;table_x+left_width+all_width*(i-1)/total_no&#038;"px,"&#038;table_y+all_height+15&#038;"px'/>&#8220;<br/>response.write &#8220;&#8221;<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x+left_width+all_width*(i-1)/total_no&"px;top:"&#038;table_y+all_height&"px;width:"&#038;all_width/total_no&"px;height:18px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='left'>&#8220;&#038;total(i,0)&#038;&#8221;</td></tr></table><p></v:textbox></v:shape>&#8220;<br/>next<br/><br/>tb_height=30<br/>response.write &#8220;<v:rect id='_x0000_s1025' style='position:absolute;left:"&#038;table_x+all_width+20&"px;top:"&#038;table_y&"px;width:100px;height:"&#038;line_no*tb_height+20&"px;z-index:1'/>&#8220;<br/>for i=1 to line_no<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x+all_width+25&"px;top:"&#038;table_y+10+(i-1)*tb_height&"px;width:60px;height:"&#038;tb_height&"px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='left'>&#8220;&#038;line_code(i,5)&#038;&#8221;</td></tr></table><p></v:textbox></v:shape>&#8220;<br/>response.write &#8220;<v:rect id='_x0000_s1040' alt='' style='position:absolute;left:"&#038;table_x+all_width+80&"px;top:"&#038;table_y+10+(i-1)*tb_height+4&"px;width:30px;height:20px;z-index:1' fillcolor='"&#038;line_code<br
/> (i,1)&#038;"'><v:fill color2='"&#038;line_code(i,1)&#038;"' rotate='t' focus='100%' type='gradient'/></v:rect>&#8220;<br/>next<br/><br/>end function<br/>%><br/><br/> <br/><br/><br/><%<br/>function table3(total,table_x,table_y,all_width,all_height,table_type)<br/>&#8216;参数含义(传递的数组，横坐标，纵坐标，图表的宽度，图表的高度,图表的类型)<br/>&#8216;纯ASP代码生成图表函数3——饼图<br/>&#8216;作者：龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@sina.com Email:passwordgm@sina.com<br/>&#8216;本人非常愿意和ASP,VML,FLASH的爱好者在HTTP://topclouds.126.com进行交流和探讨<br/>&#8216;版本1.0 最后修改日期 2003-8-11<br/>&#8216;非常感谢您使用这个函数，请您使用和转载时保留版权信息，这是对作者工作的最好的尊重。<br/>tb_height=30<br/><br/>dim tb_color(7,2)<br/>tb_color(1,1)=&#8221;#d1ffd1&#8243;<br/>tb_color(2,1)=&#8221;#ffbbbb&#8221;<br/>tb_color(3,1)=&#8221;#ffe3bb&#8221;<br/>tb_color(4,1)=&#8221;#cff4f3&#8243;<br/>tb_color(5,1)=&#8221;#d9d9e5&#8243;<br/>tb_color(6,1)=&#8221;#ffc7ab&#8221;<br/>tb_color(7,1)=&#8221;#ecffb7&#8243;<br/><br/>tb_color(1,2)=&#8221;#00ff00&#8243;<br/>tb_color(2,2)=&#8221;#ff0000&#8243;<br/>tb_color(3,2)=&#8221;#ff9900&#8243;<br/>tb_color(4,2)=&#8221;#33cccc&#8221;<br/>tb_color(5,2)=&#8221;#666699&#8243;<br/>tb_color(6,2)=&#8221;#993300&#8243;<br/>tb_color(7,2)=&#8221;#99cc00&#8243;<br/><br/>total_no=ubound(total,1)<br/>totalpie=0<br/>for i=1 to total_no<br/>totalpie=totalpie+total(i,1)<br/>next<br/><br/>PreAngle=0<br/>for i=1 to total_no<br/>response.write &#8220;<v:shape id='_x0000_s1025' alt='' style='position:absolute;left:"&#038;table_x&"px;top:"&#038;table_y&"px;width:"&#038;all_width&"px;height:"&#038;all_height&"px;z-index:1' coordsize='1500,1400' o:spt='100' adj='0,,0' path='m750,700ae750,700,750,700,"&#038;int(23592960*PreAngle)&#038;","&#038;int(23592960*total(i,1)/totalpie)&#038;"xe' fillcolor='"&#038;tb_color(i,1)&#038;"' strokecolor='#FFFFFF'><v:fill color2='"&#038;tb_color(i,2)&#038;"' rotate='t' focus='100%' type='gradient'/><v:stroke joinstyle='round'/><v:formulas/><v:path o:connecttype='segments'/></v:shape>&#8220;&#038;CHr(13)<br/>PreAngle=PreAngle+total(i,1)/totalpie<br/>next<br/><br/>if table_type=&#8221;A&#8221; then<br/>response.write &#8220;<v:rect id='_x0000_s1025' style='position:absolute;left:"&#038;table_x+all_width+20&"px;top:"&#038;table_y+20&"px;width:100px;height:"&#038;total_no*tb_height+20&"px;z-index:1'/>&#8220;<br/>for i=1 to total_no<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x+all_width+25&"px;top:"&#038;table_y+30+(i-1)*tb_height&"px;width:60px;height:"&#038;tb_height&"px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='left'>&#8220;&#038;total(i,0)&#038;&#8221;</td></tr></table><p></v:textbox></v:shape>&#8220;<br/>response.write &#8220;<v:rect id='_x0000_s1040' alt='' style='position:absolute;left:"&#038;table_x+all_width+80&"px;top:"&#038;table_y+30+(i-1)*tb_height+3&"px;width:30px;height:20px;z-index:1' fillcolor='"&#038;tb_color(i,1)&#038;"'><v:fill color2='"&#038;tb_color(i,2)&#038;"' rotate='t' focus='100%' type='gradient'/></v:rect>&#8220;<br/>&#8216;显示比例数<br/>&#8216; response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;table_x+all_width+110&"px;top:"&#038;table_y+30+(i-1)*tb_height&"px;width:60px;height:"&#038;tb_height&"px;z-index:1'>&#8220;<br/>&#8216; response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='left'>&#8220;&#038;formatnumber(total(i,1)*100/totalpie,2,-1)&#038;&#8221;%</td></tr></table><p></v:textbox></v:shape>&#8220;<br/>next<br/>end if<br/><br/>if table_type=&#8221;B&#8221; then<br/>pie=3.14159265358979<br/>TempPie=0<br/>for i=1 to total_no<br/>TempAngle=pie*2*(total(i,1)/(TotalPie*2)+TempPie)<br/>x1=table_x+all_width/2+cos(TempAngle)*all_width*3/8<br/>y1=table_y+all_height/2-sin(TempAngle)*all_height*3/8<br/>x2=table_x+all_width/2+cos(TempAngle)*all_width*3/4<br/>y2=table_y+all_height/2-sin(TempAngle)*all_height*3/4<br/>if x2>table_x+all_width/2 then<br/> x3=x2+20<br/> x4=x3<br/>else<br/> x3=x2-20<br/> x4=x3-100<br/>end if<br/>response.write &#8220;<v:oval id='_x0000_s1027' style='position:absolute;left:"&#038;x1-2&"px;top:"&#038;y1-2&"px;width:4px;height:4px; z-index:2' fillcolor='#111111' strokecolor='#111111'/>&#8220;&#038;CHR(13)<br/>response.write &#8220;<v:line id='_x0000_s1025' alt='' style='position:absolute;left:0;text-align:left;top:0;z-index:1' from='"&#038;x1&#038;"px,"&#038;y1&#038;"px' to='"&#038;x2&#038;"px,"&#038;y2&#038;"px' coordsize='21600,21600' strokecolor='#111111' strokeweight='1px'></v:line>&#8220;<br/>response.write &#8220;<v:line id='_x0000_s1025' alt='' style='position:absolute;left:0;text-align:left;top:0;z-index:1' from='"&#038;x2&#038;"px,"&#038;y2&#038;"px' to='"&#038;x3&#038;"px,"&#038;y2&#038;"px' coordsize='21600,21600' strokecolor='#111111' strokeweight='1px'></v:line>&#8220;<br/>response.write &#8220;<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&#038;x4&"px;top:"&#038;y2-10&"px;width:100px;height:20px;z-index:1'>&#8220;<br/>response.write &#8220;<v:textbox inset='0px,0px,0px,0px'><br
/><table
cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td
align='left'>&#8220;&#038;total(i,0)&#038;&#8221; &#8220;&#038;formatnumber(total(i,1)*100/totalpie,2,-1)&#038;&#8221;%</td></tr></table><p></v:textbox></v:shape>&#8220;<br/>TempPie=TempPie+total(i,1)/TotalPie<br/>next<br/>end if<br/><br/>end function<br/>%><br/><br/> <br/><br/>纯ASP代码生成图表函数1——柱状图调用示例<br/><%<br/>dim total(7,2)<br/>total(1,1)=200<br/>total(2,1)=800<br/>total(3,1)=1000<br/>total(4,1)=600<br/>total(5,1)=1222<br/>total(6,1)=3213<br/>total(7,1)=8<br/><br/>total(1,2)=&#8221;中国经营报&#8221;<br/>total(2,2)=&#8221;招聘网&#8221;<br/>total(3,2)=&#8221;51Job&#8221;<br/>total(4,2)=&#8221;新民晚报&#8221;<br/>total(5,2)=&#8221;新闻晚报&#8221;<br/>total(6,2)=&#8221;南方周末&#8221;<br/>total(7,2)=&#8221;羊城晚报&#8221;<br/><br/>total_no=7<br/>%><br/><html
xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><br/><!--[if !mso]><br/><br
/><style>/*<![CDATA[*/<br/>v\:*         { behavior: url(#default#VML) }<br/>o\:*         { behavior: url(#default#VML) }<br/>.shape       { behavior: url(#default#VML) }<br/>/*]]>*/</style><p><br/><![endif]--><br/><head><br/><meta
http-equiv="Content-Type" content="text/html; charset=gb2312"><br/><title></title><br/><br
/><style>/*<![CDATA[*/<br/>TD { FONT-SIZE: 9pt}<br/>/*]]>*/</style><p></head><br/><body
topmargin=5 leftmargin=0 scroll=AUTO><br/><%'call table1(total,200,20,20,30,400,200,"A")%><br/><%'call table1(total,200,320,20,20,400,250,"B")%><br/><%call table2(total,200,200,100,100,0)%><br/><br/><%'call table3(total,200,200,200,200,"A")%><br/><br/></p> <img
src="http://code.9enjoy.com/?ak_action=api_record_view&id=41&type=feed" alt="" />]]></content:encoded> <wfw:commentRss>http://code.9enjoy.com/asp/%e7%ba%afasp%e4%bb%a3%e7%a0%81%e7%94%9f%e6%88%90%e5%9b%be%e8%a1%a8%e5%87%bd%e6%95%b01%e2%80%94%e2%80%94%e6%9f%b1%e7%8a%b6%e5%9b%be/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk
Database Caching 11/14 queries in 0.004 seconds using disk

Served from: code.itlearner.com @ 2012-02-07 03:11:24 -->
