我想画个价格走势图(折线图),看了《ASP 2.0揭秘》里的第三方组件有个shotgraph组件但画出来的是柱状图(程序如下),不知该怎么改,还有别的什么组件能画这种图吗?
<% response.ContentType="image/jpeg"
set con=application("Cn")
sql="select top 10 * from ProductPrice "
set rs=con.execute(sql)
myArray=rs.GetRows
count=UBOUND(myArray,2)
for i=1 to count
if myArray(1,i)>maxValue then
maxValue=myArray(1,i)
end if
next
set g=createObject("shotgraph.image")
g.createImage 200,30*count,2
g.setColor 0,255,255,255
g.setColor 1,0,0,255
g.setBgColor 0
g.FillRect 0,0,200,30*count
g.SetBGColor 1
g.CreatePen "PS_SOLID",1,1
ypos=1
for i=1 to count
xpos=cINT(myArray(1,i)*(190/maxValue))
g.Rectangle 1,ypos,xpos,ypos+10
g.TextOut 1,ypos+12,myArray(0,i)
ypos=ypos+30
next
Response.BinaryWrite g.JpegImage(90,0,"")%>
我试过用owcchart发现好象有bug(移到另一台机子上就失灵了!)