2024年5月17日发(作者:佳能ixus1100hs)
ASP绘制折线图实例
<%
dim total(7,3)
total(1,0)="x1"
total(2,0)="x2"
total(3,0)="x3"
total(4,0)="x4"
total(5,0)="x5"
total(6,0)="x6"
total(7,0)="x7"
'参数1线条的颜色,参数2线条的宽度,参数3线条的类型,参数4转折点的类型,参数5
线条名称
total(0,1)="#FF0000,1.5,1,2,公司1"
total(1,1)=200
total(2,1)=1200
total(3,1)=900
total(4,1)=600
total(5,1)=1222
total(6,1)=413
total(7,1)=800
total(0,2)="#0000FF,1,2,3,公司2"
total(1,2)=400
total(2,2)=500
total(3,2)=1040
total(4,2)=1600
total(5,2)=1
total(6,2)=813
total(7,2)=980
total(0,3)="#004D00,1,1,3,公司3"
total(1,3)=900
total(2,3)=890
total(3,3)=1240
total(4,3)=1300
total(5,3)=722
total(6,3)=833
total(7,3)=1280
%>
xmlns:o="urn:schemas-microsoft-com:office:office">
<%call table2(total,100,90,600,250,3)%>
<%
function table2(total,table_x,table_y,all_width,all_height,line_no)
'参数含义(传递的数组,横坐标,纵坐标,图表的宽度,图表的高度,折线条数)
'纯ASP代码生成图表函数2——折线图
'作者:龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@ Email:passwordgm@
'本人非常愿意和ASP,VML,FLASH的爱好者在HTTP://进行交流和探讨
'非常感谢您使用这个函数,请您使用和转载时保留版权信息,这是对作者工作的最好的尊重。
line_color="#69f"
left_width=70
total_no=ubound(total,1)
temp1=0
if total_no>0 then temp6=total(1,1)
for i=1 to total_no
for j=1 to line_no
if temp1 if temp6>total(i,j) then temp6=total(i,j) next next temp1=int(temp1) if temp6>0 then temp6=int(temp6) if temp6>10 then temp2=mid(cstr(temp6),2,1) if temp2>4 then temp3=(int(temp6/(10^(len(cstr(temp6))-1)))-1)*10^(len(cstr(temp6))-1)
发布者:admin,转转请注明出处:http://www.yc00.com/num/1715926031a2692934.html
评论列表(0条)