chartfx用法

发表于:2007-06-30来源:作者:点击数: 标签:
dim sql set cn=Server.CreateObject(ADODB.Connection) set rs=server.createobject(ADODB.Recordset) @#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#创建 timestr=Request.QueryString(stime) dat
dim sql

set cn=Server.CreateObject("ADODB.Connection")
set rs=server.createobject("ADODB.Recordset")
@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#创建
timestr=Request.QueryString("stime")
datano=Request.QueryString("datano")
endtime=Request.QueryString("etime")
sstring=Request.QueryString("string")
@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#取得变量
sql = "SELECT DISTINCT * From DATA_LOGS WHERE time >= @#"& timestr &"@# AND datano = @#"& datano &"@#" &"and time<@#" & endtime & "@#"
cn.Open"dsn=123;uid=sa;pwd="
rs.Open sql, cn, 3,2
i = rs.RecordCount
@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#从数据库中得到记录集
if i =0 then
response.end
end if
num=i
rs.MoveFirst

ReDim arr(i)
For i = 1 To num
If Not rs.EOF Then
arr(i) = rs.Fields("value") / 1000
rs.MoveNext
End If
Next
@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#给动态数组赋值
rs.Close
cn.Close

%>
  redim dataarr(300)
  ii=<%=num%>
<%for i=1 to num %>
dataarr(<%=i%>)=<%=arr(i)%>
<%next%>
@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#服务端传值给客户端动态数组
DChartfx1.ThisSerie =0@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#chartfax是一个BORLAND公司的控件。首先 指定SERIES。注意:有时使用会出现异样的冲突。
DChartfx1.ToolBar = true@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#CHART的工具箱为真
DChartfx1.ChartType  =1 @#@#@#@#@#@#@#-------------chart的显示类型为曲线
dChartfx1.OpenDataEx 1,1,1@#@#@#@#@#@#------------用OPENDATAEX方法注意:它的三个参数变量。第一个为赋值类型,1 为X值,
                          @#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#第二个为SERIR的个数,第三个是为X赋值的个数。初是化为 1。
for i=1 to ii
DChartfx1.Value(i-1)=dataarr(i)@#10*i@#@#@#@#@#@#@#@#@#@#@#@#把动态数组的值X轴写值
DChartfx1.KeyLeg(i)= i @#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#-----X轴的标签
next

DChartfx1.CloseData 1@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#close the communications channel
end sub

原文转自:http://www.ltesting.net