纯ASP代码生成图表函数

制作网页数据图表/曲线图【flash版本】 这里是FLASH版的图表组件,大部分都是免费,或者开源的,商业不推荐,推荐使用第一个     1.Open Flash Chart - Open Flash Chart 是一个 Flash 图表组件,很容易安装,提供以下语言的API: PHP, Perl, Python, Java, Ruby on Rails, and .Net 来控制图表。    2.AmCharts 阅读详情

<%
function table1(total,table_x,table_y,thickness,table_width,all_width,all_height,table_type)
'参数含义(传递的数组,横坐标,纵坐标,柱子的厚度,柱子的宽度,图表的宽度,图表的高度,图表的类型)
'纯ASP代码生成图表函数1——柱状图
'作者:龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@sina.com Email:passwordgm@sina.com
'本人非常愿意和ASP,VML,FLASH的爱好者在HTTP://topclouds.126.com进行交流和探讨
'版本2.0 最后修改日期 2003-7-22
'非常感谢您使用这个函数,请您使用和转载时保留版权信息,这是对作者工作的最好的尊重。
dim tb_color(7,2)
tb_color(1,1)="#d1ffd1"
tb_color(2,1)="#ffbbbb"
tb_color(3,1)="#ffe3bb"
tb_color(4,1)="#cff4f3"
tb_color(5,1)="#d9d9e5"
tb_color(6,1)="#ffc7ab"
tb_color(7,1)="#ecffb7"

tb_color(1,2)="#00ff00"
tb_color(2,2)="#ff0000"
tb_color(3,2)="#ff9900"
tb_color(4,2)="#33cccc"
tb_color(5,2)="#666699"
tb_color(6,2)="#993300"
tb_color(7,2)="#99cc00"

line_color="#69f"
left_width=70
length=thickness/2
total_no=ubound(total,1)

temp1=0
for i=1 to total_no
if temp1<total(i,1) then temp1=total(i,1)
next
temp1=int(temp1)
if temp1>9 then
temp2=mid(cstr(temp1),2,1)
if temp2>4 then
  temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+1)*10^(len(cstr(temp1))-1)
else
  temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+0.5)*10^(len(cstr(temp1))-1)
end if
else
if temp1>4 then temp3=10 else temp3=5
end if
temp4=temp3
response.write "<!--[if gte vml 1]><v:rect id='_x0000_s1027' alt='' style='position:absolute;left:"&table_x+left_width&"px;top:"&table_y&"px;width:"&all_width&"px;height:"&all_height&"px;z-index:-1' fillcolor='#9cf' stroked='f'><v:fill rotate='t' angle='-45' focus='100%' type='gradient'/></v:rect><![endif]-->"
response.write "<!--[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='"&table_x+left_width&"px,"&table_y+all_height&"px' to='"&table_x+all_width+left_width&"px,"&table_y+all_height&"px'/><![endif]-->"
response.write "<!--[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='"&table_x+left_width&"px,"&table_y&"px' to='"&table_x+left_width&"px,"&table_y+all_height&"px'/><![endif]-->"

select case table_type
case "A"
table_space=(all_width-table_width*total_no)/total_no
response.write "<!--[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='"&table_x+left_width+length&"px,"&table_y&"px' to='"&table_x+left_width+length&"px,"&table_y+all_height-length&"px' strokecolor='"&line_color&"'/><![endif]-->"
for i=0 to all_height-1 step all_height/5
response.write "<!--[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='"&table_x+left_width&"px,"&table_y+all_height-length-i&"px' to='"&table_x+left_width+length&"px,"&table_y+all_height-i&"px' strokecolor='"&line_color&"'/><![endif]-->"
response.write "<!--[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='"&table_x+left_width+length&"px,"&table_y+all_height-length-i&"px' to='"&table_x+all_width+left_width&"px,"&table_y+all_height-length-i&"px' strokecolor='"&line_color&"'/><![endif]-->"
response.write "<!--[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='"&table_x+(left_width-15)&"px,"&table_y+i&"px' to='"&table_x+left_width&"px,"&table_y+i&"px'/><![endif]-->"
response.write "<!--[if gte vml 1]>"
response.write "<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&table_x&"px;top:"&table_y+i&"px;width:"&left_width&"px;height:18px;z-index:1'>"
response.write "<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='right'>"&temp4&"</td></tr></table></v:textbox></v:shape><![endif]-->"
temp4=temp4-temp3/5
next
for i=1 to total_no
temp_space=table_x+left_width+table_space/2+table_space*(i-1)+table_width*(i-1)
response.write "<v:rect id='_x0000_s1025' alt='' style='position:absolute;left:"
response.write temp_space
response.write "px;top:"
response.write table_y+all_height*(1-(total(i,1)/temp3))
response.write "px;width:"&table_width&"px;height:"&all_height*(total(i,1)/temp3)&"px;z-index:1' fillcolor='"&tb_color(i,2)&"'>"
response.write "<v:fill color2='"&tb_color(i,1)&"' rotate='t' type='gradient'/>"
response.write "<o:extrusion v:ext='view' backdepth='"&thickness&"pt' color='"&tb_color(i,2)&"' on='t'/>"
response.write "</v:rect>"
response.write "<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&temp_space&"px;top:"&table_y+all_height*(1-(total(i,1)/temp3))-table_width&"px;width:"&table_space+15&"px;height:18px;z-index:1'>"
response.write "<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='center'>"&total(i,1)&"</td></tr></table></v:textbox></v:shape>"

response.write "<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&temp_space-table_space/2&"px;top:"&table_y+all_height+1&"px;width:"&table_space+table_width&"px;height:18px;z-index:1'>"
response.write "<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='center'>"&total(i,2)&"</td></tr></table></v:textbox></v:shape>"
next
Case "B"
table_space=(all_height-table_width*total_no)/total_no
response.write "<!--[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='"&table_x+left_width+length&"px,"&table_y+all_height-length&"px' to='"&table_x+left_width+all_width&"px,"&table_y+all_height-length&"px' strokecolor='"&line_color&"'/><![endif]-->"
for i=0 to all_width-1 step all_width/5
response.write "<!--[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='"&table_x+left_width+i&"px,"&table_y+all_height-length&"px' to='"&table_x+left_width+length+i&"px,"&table_y+all_height&"px' strokecolor='"&line_color&"'/><![endif]-->"
response.write "<!--[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='"&table_x+left_width+length+i&"px,"&table_y+all_height-length&"px' to='"&table_x+left_width+length+i&"px,"&table_y&"px' strokecolor='"&line_color&"'/><![endif]-->"
response.write "<!--[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='"&table_x+left_width+i+all_width/5&"px,"&table_y+all_height&"px' to='"&table_x+left_width+i+all_width/5&"px,"&table_y+all_height+15&"px'/><![endif]-->"
response.write "<!--[if gte vml 1]>"
response.write "<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&table_x+left_width+i+all_width/5-left_width&"px;top:"&table_y+all_height&"px;width:"&left_width&"px;height:18px;z-index:1'>"
response.write "<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='right'>"&temp4&"</td></tr></table></v:textbox></v:shape><![endif]-->"
temp4=temp4-temp3/5
next

for i=1 to total_no
temp_space=table_space/2+table_space*(i-1)+table_width*(i-1)
response.write "<v:rect id='_x0000_s1025' alt='' style='position:absolute;left:"
response.write table_x+left_width
response.write "px;top:"
response.write table_y+temp_space
response.write "px;width:"&all_width*(total(i,1)/temp3)&"px;height:"&table_width&"px;z-index:1' fillcolor='"&tb_color(i,2)&"'>"
response.write "<v:fill color2='"&tb_color(i,1)&"' rotate='t' angle='-90' focus='100%' type='gradient'/>"
response.write "<o:extrusion v:ext='view' backdepth='"&thickness&"pt' color='"&tb_color(i,2)&"' on='t'/>"
response.write "</v:rect>"
response.write "<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&table_x+left_width+all_width*(total(i,1)/temp3)+thickness/2&"px;top:"&table_y+temp_space&"px;width:"&table_space+15&"px;height:18px;z-index:1'>"
response.write "<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='center'>"&total(i,1)&"</td></tr></table></v:textbox></v:shape>"

response.write "<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&table_x&"px;top:"&table_y+temp_space&"px;width:"&left_width&"px;height:18px;z-index:1'>"
response.write "<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='right'>"&total(i,2)&"</td></tr></table></v:textbox></v:shape>"
next
case else
end select

end function
%>

 

<%
function table2(total,table_x,table_y,all_width,all_height,line_no)
'参数含义(传递的数组,横坐标,纵坐标,图表的宽度,图表的高度,折线条数)
'纯ASP代码生成图表函数2——折线图
'作者:龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@sina.com Email:passwordgm@sina.com
'本人非常愿意和ASP,VML,FLASH的爱好者在HTTP://topclouds.126.com进行交流和探讨
'版本1.0 最后修改日期 2003-8-11
'非常感谢您使用这个函数,请您使用和转载时保留版权信息,这是对作者工作的最好的尊重。

line_color="#69f"
left_width=70
total_no=ubound(total,1)

temp1=0
for i=1 to total_no
for j=1 to line_no
  if temp1<total(i,j) then temp1=total(i,j)
next
next
temp1=int(temp1)
if temp1>9 then
temp2=mid(cstr(temp1),2,1)
if temp2>4 then
  temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+1)*10^(len(cstr(temp1))-1)
else
  temp3=(int(temp1/(10^(len(cstr(temp1))-1)))+0.5)*10^(len(cstr(temp1))-1)
end if
else
if temp1>4 then temp3=10 else temp3=5
end if
temp4=temp3
response.write "<v:rect id='_x0000_s1027' alt='' style='position:absolute;left:"&table_x+left_width&"px;top:"&table_y&"px;

width:"&all_width&"px;height:"&all_height&"px;z-index:-1' fillcolor='#9cf' stroked='f'><v:fill rotate='t' angle='-45' focus='100%' type='gradient'/></v:rect>"
for i=0 to all_height-1 step all_height/5
response.write "<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&table_x+left_width+length&"px,"&table_y+all_height-length-i&"px' to='"&table_x+all_width+left_width&"px,"&table_y+all_height-length-i&"px' strokecolor='"&line_color&"'/>"
response.write "<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&table_x+(left_width-15)&"px,"&table_y+i&"px' to='"&table_x+left_width&"px,"&table_y+i&"px'/>"
response.write ""
response.write "<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&table_x&"px;top:"&table_y+i&"px;

width:"&left_width&"px;height:18px;z-index:1'>"
response.write "<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='right'>"&temp4&"</td></tr></table></v:textbox></v:shape>"
temp4=temp4-temp3/5
next
response.write "<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&table_x+left_width&"px,"&table_y+all_height&"px' to='"&table_x+all_width+left_width&"px,"&table_y+all_height&"px'/>"
response.write "<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&table_x+left_width&"px,"&table_y&"px' to='"&table_x+left_width&"px,"&table_y+all_height&"px'/>"

dim line_code
redim line_code(line_no,5)
for i=1 to line_no
line_temp=split(total(0,i),",")
line_code(i,1)=line_temp(0)
line_code(i,2)=line_temp(1)
line_code(i,3)=line_temp(2)
line_code(i,4)=line_temp(3)
line_code(i,5)=line_temp(4)
next
for j=1 to line_no
for i=1 to total_no-1
   x1=table_x+left_width+all_width*(i-1)/total_no
   y1=table_y+(temp3-total(i,j))*(all_height/temp3)
   x2=table_x+left_width+all_width*i/total_no
   y2=table_y+(temp3-total(i+1,j))*(all_height/temp3)
   response.write "<v:line id=""_x0000_s1025"" alt="""" style='position:absolute;left:0;text-align:left;top:0;z-index:1' from="""&x1&"px,"&y1&"px"" to="""&x2&"px,"&y2&"px"" coordsize=""21600,21600"" strokecolor="""&line_code(j,1)&""" strokeweight="""&line_code(j,2)&""">"
  select case line_code(j,3)
  case 1
  case 2
   response.write "<v:stroke dashstyle='1 1'/>"
  case 3
   response.write "<v:stroke dashstyle='dash'/>"
  case 4
   response.write "<v:stroke dashstyle='dashDot'/>"
  case 5
   response.write "<v:stroke dashstyle='longDash'/>"
  case 6
   response.write "<v:stroke dashstyle='longDashDot'/>"
  case 7
   response.write "<v:stroke dashstyle='longDashDotDot'/>"
  case else
  end select
  response.write "</v:line>"&CHR(13)
  select case line_code(j,4)
  case 1
  case 2
   response.write "<v:rect id=""_x0000_s1027"" style='position:absolute;left:"&x1-2&"px;top:"&y1-2&"px;width:4px;height:4px; z-index:2' fillcolor="""&line_code(j,1)&""" strokecolor="""&line_code(j,1)&"""/>"&CHR(13)
  case 3
   response.write "<v:oval id=""_x0000_s1026"" style='position:absolute;left:"&x1-2&"px;top:"&y1-2&"px;width:4px;height:4px;z-index:1' fillcolor="""&line_code(j,1)&""" strokecolor="""&line_code(j,1)&"""/>"&CHR(13)
  end select
next
  select case line_code(j,4)
  case 1
  case 2
   response.write "<v:rect id=""_x0000_s1027"" style='position:absolute;left:"&x2-2&"px;top:"&y2-2&"px;width:4px;height:4px; z-index:2' fillcolor="""&line_code(j,1)&""" strokecolor="""&line_code(j,1)&"""/>"&CHR(13)
  case 3
   response.write "<v:oval id=""_x0000_s1026"" style='position:absolute;left:"&x2-2&"px;top:"&y2-2&"px;width:4px;height:4px;z-index:1' fillcolor="""&line_code(j,1)&""" strokecolor="""&line_code(j,1)&"""/>"&CHR(13)
  end select
next

for i=1 to total_no
response.write "<v:line id='_x0000_s1027' alt='' style='position:absolute;left:0;text-align:left;top:0;flip:y;z-index:-1' from='"&table_x+left_width+all_width*(i-1)/total_no&"px,"&table_y+all_height&"px' to='"&table_x+left_width+all_width*(i-1)/total_no&"px,"&table_y+all_height+15&"px'/>"
response.write ""
response.write "<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&table_x+left_width+all_width*(i-1)/total_no&"px;top:"&table_y+all_height&"px;width:"&all_width/total_no&"px;height:18px;z-index:1'>"
response.write "<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>"&total(i,0)&"</td></tr></table></v:textbox></v:shape>"
next

tb_height=30
response.write "<v:rect id='_x0000_s1025' style='position:absolute;left:"&table_x+all_width+20&"px;top:"&table_y&"px;

width:100px;height:"&line_no*tb_height+20&"px;z-index:1'/>"
for i=1 to line_no
response.write "<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&table_x+all_width+25&"px;top:"&table_y+10+(i-1)*tb_height&"px;width:60px;height:"&tb_height&"px;z-index:1'>"
response.write "<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>"&line_code(i,5)&"</td></tr></table></v:textbox></v:shape>"
response.write "<v:rect id='_x0000_s1040' alt='' style='position:absolute;left:"&table_x+all_width+80&"px;top:"&table_y+10+(i-1)*tb_height+4&"px;width:30px;height:20px;z-index:1' fillcolor='"&line_code(i,1)&"'><v:fill color2='"&line_code(i,1)&"' rotate='t' focus='100%' type='gradient'/></v:rect>"
next

end function
%>

 


<%
function table3(total,table_x,table_y,all_width,all_height,table_type)
'参数含义(传递的数组,横坐标,纵坐标,图表的宽度,图表的高度,图表的类型)
'纯ASP代码生成图表函数3——饼图
'作者:龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@sina.com Email:passwordgm@sina.com
'本人非常愿意和ASP,VML,FLASH的爱好者在HTTP://topclouds.126.com进行交流和探讨
'版本1.0 最后修改日期 2003-8-11
'非常感谢您使用这个函数,请您使用和转载时保留版权信息,这是对作者工作的最好的尊重。
tb_height=30

dim tb_color(7,2)
tb_color(1,1)="#d1ffd1"
tb_color(2,1)="#ffbbbb"
tb_color(3,1)="#ffe3bb"
tb_color(4,1)="#cff4f3"
tb_color(5,1)="#d9d9e5"
tb_color(6,1)="#ffc7ab"
tb_color(7,1)="#ecffb7"

tb_color(1,2)="#00ff00"
tb_color(2,2)="#ff0000"
tb_color(3,2)="#ff9900"
tb_color(4,2)="#33cccc"
tb_color(5,2)="#666699"
tb_color(6,2)="#993300"
tb_color(7,2)="#99cc00"

total_no=ubound(total,1)
totalpie=0
for i=1 to total_no
totalpie=totalpie+total(i,1)
next

PreAngle=0
for i=1 to total_no
response.write "<v:shape id='_x0000_s1025' alt='' style='position:absolute;left:"&table_x&"px;top:"&table_y&"px;width:"&all_width&"px;height:"&all_height&"px;z-index:1' coordsize='1500,1400' o:spt='100' adj='0,,0' path='m750,700ae750,700,750,700,"&int(23592960*PreAngle)&","&int(23592960*total(i,1)/totalpie)&"xe' fillcolor='"&tb_color(i,1)&"' strokecolor='#FFFFFF'><v:fill color2='"&tb_color(i,2)&"' rotate='t' focus='100%' type='gradient'/><v:stroke joinstyle='round'/><v:formulas/><v:path o:connecttype='segments'/></v:shape>"&CHr(13)
PreAngle=PreAngle+total(i,1)/totalpie
next

if table_type="A" then
response.write "<v:rect id='_x0000_s1025' style='position:absolute;left:"&table_x+all_width+20&"px;top:"&table_y+20&"px;width:100px;height:"&total_no*tb_height+20&"px;z-index:1'/>"
for i=1 to total_no
response.write "<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&table_x+all_width+25&"px;top:"&table_y+30+(i-1)*tb_height&"px;width:60px;height:"&tb_height&"px;z-index:1'>"
response.write "<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>"&total(i,0)&"</td></tr></table></v:textbox></v:shape>"
response.write "<v:rect id='_x0000_s1040' alt='' style='position:absolute;left:"&table_x+all_width+80&"px;top:"&table_y+30+(i-1)*tb_height+3&"px;width:30px;height:20px;z-index:1' fillcolor='"&tb_color(i,1)&"'><v:fill color2='"&tb_color(i,2)&"' rotate='t' focus='100%' type='gradient'/></v:rect>"
'显示比例数
' response.write "<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&table_x+all_width+110&"px;top:"&table_y+30+(i-1)*tb_height&"px;width:60px;height:"&tb_height&"px;z-index:1'>"
' response.write "<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>"&formatnumber(total(i,1)*100/totalpie,2,-1)&"%</td></tr></table></v:textbox></v:shape>"
next
end if

if table_type="B" then
pie=3.14159265358979
TempPie=0
for i=1 to total_no
TempAngle=pie*2*(total(i,1)/(TotalPie*2)+TempPie)
x1=table_x+all_width/2+cos(TempAngle)*all_width*3/8
y1=table_y+all_height/2-sin(TempAngle)*all_height*3/8
x2=table_x+all_width/2+cos(TempAngle)*all_width*3/4
y2=table_y+all_height/2-sin(TempAngle)*all_height*3/4
if x2>table_x+all_width/2 then
  x3=x2+20
  x4=x3
else
  x3=x2-20
  x4=x3-100
end if
response.write "<v:oval id='_x0000_s1027' style='position:absolute;left:"&x1-2&"px;top:"&y1-2&"px;width:4px;height:4px; z-index:2' fillcolor='#111111' strokecolor='#111111'/>"&CHR(13)
response.write "<v:line id='_x0000_s1025' alt='' style='position:absolute;left:0;text-align:left;top:0;z-index:1' from='"&x1&"px,"&y1&"px' to='"&x2&"px,"&y2&"px' coordsize='21600,21600' strokecolor='#111111' strokeweight='1px'></v:line>"
response.write "<v:line id='_x0000_s1025' alt='' style='position:absolute;left:0;text-align:left;top:0;z-index:1' from='"&x2&"px,"&y2&"px' to='"&x3&"px,"&y2&"px' coordsize='21600,21600' strokecolor='#111111' strokeweight='1px'></v:line>"
response.write "<v:shape id='_x0000_s1025' type='#_x0000_t202' alt='' style='position:absolute;left:"&x4&"px;top:"&y2-10&"px;width:100px;height:20px;z-index:1'>"
response.write "<v:textbox inset='0px,0px,0px,0px'><table cellspacing='3' cellpadding='0' width='100%' height='100%'><tr><td align='left'>"&total(i,0)&" "&formatnumber(total(i,1)*100/totalpie,2,-1)&"%</td></tr></table></v:textbox></v:shape>"
TempPie=TempPie+total(i,1)/TotalPie
next
end if

end function
%>

 

纯ASP代码生成图表函数1——柱状图调用示例
<%
dim total(7,2)
total(1,1)=200
total(2,1)=800
total(3,1)=1000
total(4,1)=600
total(5,1)=1222
total(6,1)=3213
total(7,1)=8

total(1,2)="中国经营报"
total(2,2)="招聘网"
total(3,2)="51Job"
total(4,2)="新民晚报"
total(5,2)="新闻晚报"
total(6,2)="南方周末"
total(7,2)="羊城晚报"

total_no=7
%>
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<!--[if !mso]>
<style>
v/:*         { behavior: url(#default#VML) }
o/:*         { behavior: url(#default#VML) }
.shape       { behavior: url(#default#VML) }
</style>
<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style>
TD { FONT-SIZE: 9pt}
</style></head>
<body topmargin=5 leftmargin=0 scroll=AUTO>
<%call table1(total,200,20,20,30,400,200,"A")%>
<%call table1(total,200,320,20,20,400,250,"B")%>
</body>
</html>

Asp生成柱状图的实例代码分析 本文还有配套的精品资源,点击获取 简介:在Asp开发中,利用服务器端技术生成柱状图以直观展示数据分析结果是一项常见需求。本文将详细解释如何通过Asp代码实现柱状图的生成,包括数据获取、处理、图形库选择及响应用户请求的过程。同时,也将讨论性能优化、安全性增强和响应式设计等方面的内容,旨在为读者提供一个全面的Asp生成柱状图的实践经验。 1. Asp简介及基础应用 ... 阅读详情

相关推荐

ASP生成柱型体,折线图,饼图源代码提供了第1/3页

ASP生成柱型体,折线图,饼图源代码 <% function table2(total,table_x,table_y,all_width,all_height,line_no) ‘参数含义(传递的数组,横坐标,纵坐标,图表的宽度,图表的高度,折线条数) ‘纯ASP代码生成图表函数2——折线图 ‘作者:龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@sina.com Email:passwordgm@sina.com ‘本人非常愿意和ASP,VML,FLASH的爱好者在HTTP://topclouds.126.com进行交流和探讨 ‘版本1.0 最后修改日期

避坑指南:Livox AVIA和MID360多雷达ROS驱动配置,搞懂`multi_topic`和`xfer_format`参数怎么设

本文详细解析了Livox AVIA和MID360多雷达ROS驱动配置中的关键参数`multi_topic`和`xfer_format`,帮助开发者避免常见配置错误。通过实战案例和避坑指南,提升多激光雷达系统在机器人感知应用中的稳定性和性能,特别适用于Bunker_mini_dev等移动平台。

weixin_30825581的博客 474

超越PSPNet:PPM模块在医疗影像分割中的创新应用实验

本文探讨了PPM模块在医疗影像分割中的创新应用,通过定制化调整和优化策略显著提升分割精度。针对医疗影像的多尺度病灶特点,提出了动态尺度选择和交叉尺度融合模块(CSFM),结合PyTorch实现细节,使小病灶检测召回率提升11.3%。实验显示优化后的模型mIoU达到78.6%,较基线提升9.2个百分点,同时满足实时处理需求。

u9v0w的博客 219

在ASP中使用ASPChart组件生成图表

DelphiASPOBJ.ChartType=0图表的类型:0:直线 1:柱状图2:饼状图 3:水平柱状图 4:区域填充图 5:点形图)    Response.C    创建图表对象    Set DelphiASPObj = Server.CreateObject("AspChart.WebChart")    设置生成图表的宽度和高度    DelphiASPObj.Width=330

hunluandiaoling的专栏 880

阿里云大模型ACP认证模拟考试(二)

摘要:在阿里云大模型高级工程师 ACP 认证暂无真题题库的现状下,模拟题具有重要意义。其依照真实考试设计,涵盖题型、题量与分值分布,助力考生熟悉考试框架,合理分配答题时间精力,提升效率。同时,模拟题紧扣官方课程,能帮助考生精准定位知识盲点,如大模型架构原理和通义千问应用实践等重点内容,以便针对性完善知识体系。此外,通过练习模拟题,考生可掌握不同题型的解题思维与技巧,快速洞察复杂题目本质,提高答题准确率。

davidkorhenn的博客 2077

纯相位全息图优化算法综述

除此之外,还有许多用于减少斑点噪声的非迭代方法,例如:采用下采样掩膜的采样纯相位全息图(Sampled-Phase-only Hologram)方法、模式化相位掩膜(Patterned Phase-Only Hologram)方法、双相位方法(Double-Phase Method),以及使用非随机相位掩膜的方法(Random Phase-Free Method)等。迭代算法通常由一个对目标全息图的近似出发,经过一系列的重复操作不断优化这个近似全息图,直到该近似所得到的重建图像满足一定的误差要求;

ZhongKeWeiXing的博客 1428

ASP生成柱型体,折线图,饼图源代码

total(1,0)="中国经营报"  total(2,0)="招聘网"  total(3,0)="51Job"  total(4,0)="新民晚报"  total(5,0)="新闻晚报"  total(6,0)="南方周末"  total(7,0)="羊城晚报"  total(0,1)="#FF0000,1.5,1,2,公司1"参数1线条的颜色,参数2线条的宽度,参数3线条的类型,参数4转折点

派的无理性 2550

DRM驱动代码分析:展频 跳频

DRM驱动代码分析:展频 跳频

yuuu_cheer的博客 2680

4、纯ASP代码生成图表函数——饼图

4、纯ASP代码生成图表函数——饼图total(1,0)="中国经营报"total(2,0)="招聘网"total(3,0)="51Job"total(4,0)="新民晚报"total(5,0)="新闻晚报"total(6,0)="南方周末"total(7,0)="羊城晚报"total(1,1)=200total(2,1)=1200total(3,1)=900total(4,1)=600tot

tsxnb的专栏 945

Odoo 入门 | 什么是 Odoo?

Odoo是一套全球开源的ERP/CRM系统,最初的名字为TinyERP,08年5月之后称之为OpenERP,之后又改为Odoo。

洛阳泰山的博客 6208

【科研绘图系列】R语言绘制代谢物与临床表型相关性的森林图

本研究通过森林图展示了特定代谢物与三种临床比较之间的相关性分析结果。这种方法不仅直观地展示了每个代谢物的效应大小和不确定性,还允许我们比较不同代谢物在不同临床比较中的影响。森林图的结果表明,某些代谢物在特定临床比较中显示出显著的相关性,这可能为理解疾病的代谢机制提供了重要线索。

专注生信领域 565

5、纯ASP代码生成图表函数——立体饼图

5、纯ASP代码生成图表函数——立体饼图total(1,0)="中国经营报"total(2,0)="招聘网"total(3,0)="51Job"total(4,0)="新民晚报"total(5,0)="新闻晚报"total(6,0)="南方周末"total(7,0)="羊城晚报"total(1,1)=200total(2,1)=1200total(3,1)=900total(4,1)=600t

tsxnb的专栏 885

Linux下搭建简易的HTTP服务器完成图片显示

篇文章作为Linux下socket(TCP)网络编程的练习,使用C语言代码搭建一个简单的HTTP服务器,完成与浏览器之间的交互,最终在浏览器上显示一张图片;通过这个例子可以巩固socket里多线程使用,也可以方便学习了解HTTP协议。

2588

2、纯ASP代码生成图表函数——柱图

2、纯ASP代码生成图表函数——柱图dim total(12,2)total(1,1)=56total(2,1)=7total(3,1)=-7total(4,1)=0total(5,1)=16total(6,1)=10total(7,1)=14total(8,1)=7total(9,1)=9total(10,1)=7total(11,1)=11total(12,1)=14total(1,2)="地

tsxnb的专栏 913

自动驾驶系统研发系列—全智能驾驶新高度:深入解析车道保持辅助(ELK)功能

车道保持辅助系统(ELK)是一种基于先进视觉感知技术的主动安全系统,能够通过车载摄像头实时监测道路上的车道线、道路边缘以及周围车辆的位置。这一功能的核心在于为驾驶员提供智能化的安全辅助,尤其是在驾驶员可能因疲劳、分心或其他原因无意识地偏离车道时,系统能够主动干预,从而避免危险发生。ELK系统不仅仅依靠摄像头对道路进行感知,还结合其他传感器的数据(如雷达),实时评估自车与车道线、周边车辆的相对位置。当系统检测到车辆即将偏离车道,或越过道路边缘时,ELK会通过控制电子助力转向系统(EPS)

u013889591的专栏 1211

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

3、纯ASP代码生成图表函数——折线图

3、纯ASP代码生成图表函数——折线图total(1,0)="中国经营报"total(2,0)="招聘网"total(3,0)="51Job"total(4,0)="新民晚报"total(5,0)="新闻晚报"total(6,0)="南方周末"total(7,0)="羊城晚报"total(0,1)="#FF0000,1.5,1,2,公司1"参数1线条的颜色,参数2线条的宽度,参数3线条的类型

tsxnb的专栏 1115

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

ASP生成柱型体,折线图,饼图源代码(转)

function table2(total,table_x,table_y,all_width,all_height,line_no)参数含义(传递的数组,横坐标,纵坐标,图表的宽度,图表的高度,折线条数)纯ASP代码生成图表函数2——折线图作者:龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@sina.com Email:passwordgm@sina.

milk520的专栏 1326

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

用纯ASP实现完美的WEB柱状图

用纯ASP实现完美的WEB柱状图dim total(7,2)total(1,1)=200total(2,1)=800total(3,1)=1000total(4,1)=600total(5,1)=1222total(6,1)=3213total(7,1)=8 total(1,2)="中国经营报"total(2,2)="招聘网"total(3,2)="51Job"total(4,2)="新民

xxd88的专栏 1634

本人整理好的一些ASP函数,提供给初学ASP的朋友们使用

============================textarea显示用===================================function htmlencode1(fString)  if fString  fString = replace(fString, ">", ">")  fString = replace(fString, "<", "  fSt

guoweidong的专栏 841

『vml+javascript』统计图表之树状图 【转】

[code="java"] function table1(total,table_x,table_y,thickness,table_width,all_width,all_height,table_type){ //参数含义(传递的数组,横坐标,纵坐标,柱子的厚度,柱子的宽度,图表的宽度,图表的高度,图表的类型) //纯ASP代码生成图表函数1——柱状图 //作者:龚鸣(Passwor...

BaiDaiCEO的专栏 685

纯ASP结合VML生成完美图-饼图

转自:http://goaler.xicp.net/ShowLog.asp?ID=430演示:http://goaler.xicp.net/Demo/asp_vml_pic2.asptotal(1,0)="中国经营报" total(2,0)="招聘网" total(3,0)="51Job" total(4,0)="新民晚报" total(5,0)="新闻晚报" total(6,0)="南方周末

ξσ Dicky's Blog σξ 1929

纯ASP结合VML生成完美图-柱图

转自:http://goaler.xicp.net/ShowLog.asp?ID=431演示:http://goaler.xicp.net/Demo/asp_vml_pic3.asp&lt;% dim total(7,2) total(1,1)=200 total(2,1)=800 total(3,1)=1000 total(4,1)=600 total(5,1)=1222 total(6,1)=...

happmaoo的专栏 110

柱状图

<%dim total(12,2) total(1,1)=56total(2,1)=7total(3,1)=-7total(4,1)=0total(5,1)=16total(6,1)=10total(7,1)=14total(8,1)=7total(9,1)=9total(10,1)=7total(11,1)=11total(12,1)=14 total(1,2)="地理"total(2...

weixin_30564785的博客 234

vml 实现饼图的代码

&lt;%dim total(7,1) total(1,0)="中国经营报" total(2,0)="招聘网" total(3,0)="51Job" total(4,0)="新民晚报" total(5,0)="新闻晚报" total(6,0)="南方周末" total(7,0)="羊城晚报" total(1,1)=200 total(2,1)=1200 tot

移动开发记录 109

立体饼图

<%dim total(7,1)total(1,0)="中国经营报"total(2,0)="招聘网"total(3,0)="51Job"total(4,0)="新民晚报"total(5,0)="新闻晚报"total(6,0)="南方周末"total(7,0)="羊城晚报" total(1,1)=200total(2,1)=1200total(3,1)=900total(4,1)=600to...

weixin_30767921的博客 176
上一篇: 采用Word更好地输出VFP报表
下一篇: VB填充IE上的输入框并提交
vin2000
博客等级 码龄22年 22粉丝 3原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值