欢迎光临
我们一直在努力

chartfx用法

建站超值云服务器,限时71元/月

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 =0chartfax是一个borland公司的控件。首先 指定series。注意:有时使用会出现异样的冲突。
dchartfx1.toolbar = truechart的工具箱为真
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 1close the communications channel
end sub

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » chartfx用法
分享到: 更多 (0)