| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 582 人关注过本帖
标题:[求助]請問如何把數据庫表里的數据動態顯示在圖表上
只看楼主 加入收藏
jasonxing
Rank: 1
等 级:新手上路
帖 子:40
专家分:0
注 册:2007-10-28
收藏
 问题点数:0 回复次数:4 
[求助]請問如何把數据庫表里的數据動態顯示在圖表上

cs是我新建的一個表,cs_prop是其中一個字段,我現在想要的結果是把字段cs_prop的數据動態的顯示在一個圖表上.例如 把cs_prop里的數据
A占10%
B: 20%
C: 30%
D: 40%
分別顯示在各自所占的圖層上,請問我該如何實現?


由于代碼太長,我就挑選重要的一部分,其中數据庫連接部分是我后來加上的,而圖表的制作用到javascript 和 VML


<%
set conn=server.createobject("adodb.connection")
conn.open application("constr_torus_dbf")

sql="select distinct cs_prop from cs"
set rs=Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
%>

<%
select_tmp = ""
do while not rs.eof
%>
<option value="<%=rs("cs_prop")%>"><%=rs("cs_prop")%></option>
<%
rs.movenext
loop
set rs=nothing
set conn=nothing
%>




<v:Rect id='rec1' style='position:relative;left:14700;top:2154.41176470588;width:5000;height:900;display:none' fillcolor='#efefef' strokecolor='#ff3399'> <v:fill opacity='.6' color2='fill darken(118)' o:opacity2='.6' rotate='t' method='linear sigma' focus='100%' type='gradient'/> </v:Rect> <v:Rect style='position:relative;left:14900;top:2319.41176470588;width:700;height:700' fillcolor='#ff3399' stroked='f'/> <v:Rect style='position:relative;left:15700;top:2319.41176470588;width:3900;height:700' filled='f' stroked='f'> <v:TextBox inset='0pt,2pt,0pt,0pt' style='font-size:10pt;'><div align='left'>TEAM A:5.26%</div></v:TextBox> </v:Rect>

<v:Rect id='rec9' style='position:relative;left:14700;top:8165;width:5000;height:900;display:none' fillcolor='#efefef' strokecolor='#9400d3'> <v:fill opacity='.6' color2='fill darken(118)' o:opacity2='.6' rotate='t' method='linear sigma' focus='100%' type='gradient'/> </v:Rect> <v:Rect style='position:relative;left:14900;top:8260;width:700;height:700' fillcolor='#9400d3' stroked='f'/> <v:Rect style='position:relative;left:15700;top:8260;width:3900;height:700' filled='f' stroked='f'> <v:TextBox inset='0pt,2pt,0pt,0pt' style='font-size:10pt;'><div align='left'>其他:19.84%</div></v:TextBox> </v:Rect> </v:group>


<div style='cursor:hand;'> <v:shape id='cake1' type='#Cake_3D' title='&nbsp;類&nbsp;&nbsp;別:TEAM A&#13;&#10;&nbsp;所占比例:5.26%&nbsp;&nbsp;' style='position:absolute;left:41.6666666666667px;top:6.41025641025641px;WIDTH:250px;HEIGHT:250px;rotation:191.268;z-index:10' adj='5159780.352,0' fillcolor='#ff3399' onmouseover='moveup(cake1,6.41025641025641,txt1,rec1)'; onmouseout='movedown(cake1,6.41025641025641,txt1,rec1);'> <v:fill opacity='60293f' color2='fill lighten(120)' o:opacity2='60293f' rotate='t' angle='-135' method='linear sigma' focus='100%' type='gradient'/> <o:extrusion v:ext='view' on='t'backdepth='25' rotationangle='60' viewpoint='0,0'viewpointorigin='0,0' skewamt='0' lightposition='-50000,-50000' lightposition2='50000'/> </v:shape> <v:shape id='txt1' type='#3dtxt' style='position:absolute;left:153.772078122357px;top:49.5043858942899px;z-index:15;display:none;width:65; height:24; onmouseover='ontxt(cake1,6.41025641025641,txt1,rec1)'> <v:fill opacity='60293f' color2='white' o:opacity2='60293f' rotate='t' angle='-135' method='linear sigma' focus='100%' type='gradient'/> <div><font size='-1'>TEAM A 5.26%</div> </v:shape> </div>


<div style='cursor:hand;'> <v:shape id='cake9' type='#Cake_3D' title='&nbsp;類&nbsp;&nbsp;別:其他&#13;&#10;&nbsp;所占比例:19.84%&nbsp;&nbsp;' style='position:absolute;left:41.6666666666667px;top:6.41025641025641px;WIDTH:250px;HEIGHT:250px;rotation:143.446;z-index:12' adj='3500493.056,0' fillcolor='#9400d3' onmouseover='moveup(cake9,6.41025641025641,txt9,rec9)'; onmouseout='movedown(cake9,6.41025641025641,txt9,rec9);'> <v:fill opacity='60293f' color2='fill lighten(120)' o:opacity2='60293f' rotate='t' angle='-135' method='linear sigma' focus='100%' type='gradient'/> <o:extrusion v:ext='view' on='t'backdepth='25' rotationangle='60' viewpoint='0,0'viewpointorigin='0,0' skewamt='0' lightposition='-50000,-50000' lightposition2='50000'/> </v:shape> <v:shape id='txt9' type='#3dtxt' style='position:absolute;left:79.7854302578758px;top:59.1658021937738px;z-index:15;display:none;width:65; height:24; onmouseover='ontxt(cake9,6.41025641025641,txt9,rec9)'> <v:fill opacity='60293f' color2='white' o:opacity2='60293f' rotate='t' angle='-135' method='linear sigma' focus='100%' type='gradient'/> <div><font size='-1'>其他 19.84%</div> </v:shape> </div>




搜索更多相关主题的帖子: 表里 prop 字段 conn 
2007-11-04 10:38
fuhuijun
Rank: 1
等 级:新手上路
帖 子:407
专家分:0
注 册:2007-10-30
收藏
得分:0 

大哥
你能不能不要用繁体字啊
我看我真够累的?

2007-11-06 10:17
fuhuijun
Rank: 1
等 级:新手上路
帖 子:407
专家分:0
注 册:2007-10-30
收藏
得分:0 
看的我真够累的?
2007-11-06 10:17
semenyin
Rank: 1
等 级:新手上路
帖 子:23
专家分:0
注 册:2007-11-5
收藏
得分:0 
呵呵
2007-11-06 13:55
hmhz
Rank: 7Rank: 7Rank: 7
等 级:贵宾
威 望:30
帖 子:1890
专家分:503
注 册:2006-12-17
收藏
得分:0 

不会是台湾人跑我们这来了吧

[此贴子已经被作者于2007-11-6 13:57:52编辑过]


[编程论坛] ASP超级群:49158383  敲门暗号:ASP编程
龍艺博客 http://www.
2007-11-06 13:57
快速回复:[求助]請問如何把數据庫表里的數据動態顯示在圖表上
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021858 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved