1 饼图一般用PHP写容易点
2 给个ASP的条型的
a.asp
<%
'数组DATA存储统计数据,LEGENDS存储个项的数据标住文字
dim data()
dim legends()
'max 代表最大的数据项 maxheight代表条形最大长度 multiple是绘图比列
dim max,maxheight,multipler
maxheight=150
max=0
colors=array("00","33","66","99","cc","ff")
'colors用来存储颜色
set conn=server.createobject("adodb.connection")
set rs=server.createobject("adodb.recordset")
conn.open "privader=sqloledb;data source=IP;uid=;pwd=;database="
sql="select * from 表"
rs.open sql,conn,3,3
num=rs.recordcount
redim data(num)
redim legends(num)
'获取最大房问次数
for i=0 to num-1
data(i)=rs.fields(1)
legends(i)=rs.fields(0)
if data(i)>max then max=data(i)
rs.movenext
next
multipler=maxheight/max
response.write("<tr>"<th height=60 colospan="&num&" align=center>网页设计统计</th></tr>")
response.write("<tr>")
'绘制图形
randomize
for i=0 to num-1
color=colors(int(md*6))&coors(int(md*6))&colors(int(md*6))
response.write("<td align=center valign=bottom><table boder=0 align=center>")
response.write("<tr><td width=2 bgcolor="&color&" height="&data(i) *multipler&"></td></tr>")
response.write("</table></td>")
next
resposne.write("</tr>")
'输出数据
for i=0 to num-1
response.write("<td align=center>"&data(i)&"</td>")
next
response.write("</tr>")
response.write("<tr>")
for i=0 to num-1
response.write("<td align=center>"&legends(i)&"</td>")
next
resposne.write("</tr>")
response.write("</table>")
%>