怎样用asp生成曲线呢(类似股票的曲线)?
<%@ Language=VBScript %><%
'用ASP输出图像(不用组件)
function btoh(ss) '二进制串(4位)换十六进制串
s1=ss
select case ss
case "0000"
s1="0"
case "0001"
s1="1"
case "0010"
s1="2"
case "0011"
s1="3"
case "0100"
s1="4"
case "0101"
s1="5"
case "0110"
s1="6"
case "0111"
s1="7"
case "1000"
s1="8"
case "1001"
s1="9"
case "1010"
s1="a"
case "1011"
s1="b"
case "1100"
s1="c"
case "1101"
s1="d"
case "1110"
s1="e"
case "1111"
s1="f"
end select
btoh=s1
end function
dim wimgf(400,400) '定义图形数组宽400高400
for x=1 to 400
for xx=1 to 400
wimgf(x,xx)=0
next
next
'画一条从1,1至400,400的线实际工作中可向400x400数组中画点
for x=1 to 200
wimgf(x,x)=1
next
'定义输出数组 宽400 (50x8)高400
Dim dimgf(50,400)
for x=1 to 50
for xx=1 to 400
dimgf(x,xx)="0xff,"
next
next
'图形数组换入输入数组
for x=1 to 400
for xx=1 to 50
xxt=cstr(wimgf(xx*8,x))&cstr(wimgf(xx*8-1,x))
xxt=xxt&cstr(wimgf(xx*8-2,x))&cstr(wimgf(xx*8-3,x))
xxt=xxt&cstr(wimgf(xx*8-4,x))&cstr(wimgf(xx*8-5,x))
xxt=xxt&cstr(wimgf(xx*8-6,x))&cstr(wimgf(xx*8-7,x))
dimgf(xx,x)="0x"&btoh(mid(xxt,1,4))&btoh(mid(xxt,5,8))&","
next
next
Response.ContentType ="image/x-xbitmap"
Response.Write "#define counter_width 400"&chr(13) '//图形宽
Response.Write "#define counter_height 400"&chr(13) ' //图形高
Response.Write "static unsigned char counter_bits[]={"&chr(13)
for x=1 to 400
for xx=1 to 50
Response.write dimgf(xx,x)
next
Response.write chr(13)
next
Response.Write "};"&chr(13)
%>