4、纯ASP代码生成图表函数——饼图
4、纯ASP代码生成图表函数——饼图
<%dim total(7,1)
total(1,0)="中国经营报"
total(2,0)="招聘网"
total(3,0)="51Job"
total(4,0)="新民晚报"
total(5,0)="新闻晚报"
total(6,0)="南方周末"
total(7,0)="羊城晚报"
total(1,1)=200
total(2,1)=1200
total(3,1)=900
total(4,1)=600
total(5,1)=1222
total(6,1)=413
total(7,1)=800
%><html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<!--[if !mso]>
<style>
v\:* { behavior: url(#default#VML) }
o\:* { behavior: url(#default#VML) }
.shape { behavior: url(#default#VML) }
</style>
<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<style>
TD { FONT-SIZE: 9pt}
</style></head>
<body topmargin=5 leftmargin=0 scroll=AUTO>
范例一
<%call table3(total,100,40,250,250,"A")%>
<Br><Br><Br><Br><Br><Br><Br><Br><Br><Br><Br><Br><Br><Br><Br><Br><Br><Br><Br><Br>范例二
<%call table3(total,300,450,250,250,"B")%>
</body>
</html>
<%
function table3(total,table_x,table_y,all_width,all_height,table_type)
'参数含义(传递的数组,横坐标,纵坐标,图表的宽度,图表的高度,图表的类型)
'纯ASP代码生成图表函数——饼图
'作者:龚鸣(Passwordgm) QQ:25968152 MSN:passwordgm@sina.com Email:passwordgm@sina.com
'本人非常愿意和ASP,VML,FLASH的爱好者在HTTP://www.ilisten.cn进行交流和探讨
'非常感谢您使用这个函数,请您使用和转载时保留版权信息,这是对作者工作的最好的尊重。
tb_height=30
dim tb_color(7,2)
tb_color(1,1)="#d1ffd1"
tb_color(2,1)="#ffbbbb"
tb_color(3,1)="#ffe3bb"
tb_color(4,1)="#cff4f3"
tb_color(5,1)="#d9d9e5"
tb_color(6,1)="#ffc7ab"
tb_color(7,1)="#ecffb7
相关文档:
一、用OWC
什么是OWC?
OWC是Office Web Compent的缩写,即Microsoft的Office Web组件,它为在Web中绘制图形提供
了灵活的同时也是最基本的机制。在一个intranet环境中,如果可以假设客户机上存在特定的浏览器和一
些功能强大的软件(如IE5和Office 2000),那么就有能力利用Office Web组件提供一个交互式图形开
......
<%
Dim Conn, Connstr
Dim strServer, strUid, strPwd, strDB
strServer = "HUA-5780C2D1CCF" 'SQL数据库服务器地址
strUid = "sa" '数据库用户名
strPwd = "123456" ......
1.Controller类引用的View会自动的对应到Views\XXX目录中寻找。
其中Views\Shared存放共享的试图模板。
搜索顺序:
首先搜索\Views\[Controller],如果找不到,再开始查找Views\Shared子目录。
2.
建议:视图的模板名称和Action引用的方法名称相同。
这样的话,开发人员就可以省略View Template的名称。
比如:retur ......
<%
Option Explicit
'数据库结构:
'location
'表1 loaction 所在的市 表
' 字段
' loactionid (主键)
' loactionname 名字
'表2 district 所在的县 表
' 字段
' locationid (主键)
' districtid
'&n ......
<%
function decrypt(dcode)
dim texts
dim i
for i=1 to len(dcode)
texts=texts & chr(asc(mid(dcode,i,2))-i)
next
decrypt=texts
end function
function encrypt(ecode)
dim texts
dim i
for i=1 to len(ecode)
texts=texts & chr(asc(mid(ecode,i,2))+i)
next
en ......