91网首页-91网页版-91网在线观看-91网站免费观看-91网站永久视频-91网站在线播放

LOGO OA教程 ERP教程 模切知識交流 PMS教程 CRM教程 開發文檔 其他文檔  
 
網站管理員

一個不需要第三方組件,可實現華簡單圖形的類

admin
2010年7月24日 17:7 本文熱度 5077

通常我們做統計圖的時候需要借助組件來完成例如mschart,aspchart等
但是這個類不需要任何組件,而且使用方便
clsgraph.asp
<%
class inteligraph


public copyright, developer, name, version, web
public maximum, barwidth, barcolor, orientation
private items(), cnt

private sub class_initialize()
copyright = "?2001 ticluse teknologi, all rights reserved."
developer = "james lind雗"
name = "inteligraph"
version = "1.0"
web = "cnt = 0
end sub

public function add( value )
redim preserve items( cnt )
items( cnt ) = value
data = cnt
cnt = cnt + 1
add = data
end function

public function build()
if cnt < 1 then exit function
if len( orientation ) = 0 or lcase( orientation ) = "horizontal" then
for idx = lbound( items ) to ubound( items )
data = data & "<table height=" & barwidth & " border=1 width=" & maximum & " cellspacing=2>" & vbnewline
data = data & vbtab & "<tr><td width=" & items(idx) & " bgcolor=" & barcolor & " align=center><font size=-4> </font></td>"
if items(idx) < maximum then
data = data & "<td width=" & maximum - items(idx) & "></td>"
end if
data = data & "</tr>" & vbnewline & "</table>" & vbnewline
next
elseif lcase( orientation ) = "vertical" then
data = "<table><tr>" & vbnewline
for idx = lbound( items ) to ubound( items )
data = data & "<td><table width=" & barwidth & " border=1 height=" & maximum & " cellspacing=2>" & vbnewline
if items(idx) < maximum then
data = data & "<tr><td height=" & maximum - items(idx) & "></td></tr>"
end if
data = data & vbtab & "<tr><td height=" & items(idx) & " bgcolor=" & barcolor & " align=center><font size=-4> </font></td>"
data = data & "</tr>" & vbnewline & "</table>" & vbnewline & "</td>" & vbnewline
next
data = data & "</tr></table>" & vbnewline
end if
build = data
end function

end class
%>
使用方法
這個類一共有四個屬性
barwidth(圖片條的尺寸)
barcolor*(圖片條顏色)
maximum(圖片條最大長度)
orientation(方向)
有兩個函數
add( value )添加圖片條到圖片中
build()建立圖片
事例:
<!-- #include file=clsgraph.asp -->
<%
public const vert = "vertical"
public const horz = "horizontal"

dim graph

set graph = new inteligraph
graph.barwidth = 10
graph.barcolor = "blue"
graph.maximum = 100
graph.orientation = horz

for idx = 0 to 100 step 25
graph.add( idx )
next

response.write( graph.build() )
%>


該文章在 2010/7/24 17:07:11 編輯過
關鍵字查詢
相關文章
正在查詢...
點晴ERP是一款針對中小制造業的專業生產管理軟件系統,系統成熟度和易用性得到了國內大量中小企業的青睞。
點晴PMS碼頭管理系統主要針對港口碼頭集裝箱與散貨日常運作、調度、堆場、車隊、財務費用、相關報表等業務管理,結合碼頭的業務特點,圍繞調度、堆場作業而開發的。集技術的先進性、管理的有效性于一體,是物流碼頭及其他港口類企業的高效ERP管理信息系統。
點晴WMS倉儲管理系統提供了貨物產品管理,銷售管理,采購管理,倉儲管理,倉庫管理,保質期管理,貨位管理,庫位管理,生產管理,WMS管理系統,標簽打印,條形碼,二維碼管理,批號管理軟件。
點晴免費OA是一款軟件和通用服務都免費,不限功能、不限時間、不限用戶的免費OA協同辦公管理系統。
Copyright 2010-2025 ClickSun All Rights Reserved

主站蜘蛛池模板: 精品亚洲精品偷 | 午夜免费一级视频 | 国产女同百合91 | 日本在线观看的免费 | 日本在线 | 日本乱码一区二 | 福利在线导航视频 | 国产区日韩区欧美区 | 黑人巨大 | 日韩高清电影网 | 日韩毛A | 国自产在线精品 | 午夜免费体验 | 精品福利片在线观看 | 日韩成人午夜视频 | 九一果冻制作厂在线 | 精品午夜福利日 | 91色福利| 欧美一区二区免费 | 日本三级国产在线 | 精品在线第一页 | 国产精品第18页 | 97在线观看视频 | 精品欧洲在线观看 | 国产日韩欧美一区二 | 精品a视频在线观看 | 尤物网红麻酥酥 | 日本美女日b视频 | 欧美一级日韩精品 | 欧美一级在| 国产乱子伦不卡视频 | 人成在线免费视频 | 国产亚洲无| 91视频app污| 欧美日韩精品一区 | 国产福利在线小视频 | 国产乱码精品一 | 国精产品一二二线 | 国产精品一二 | 看片天堂 | 成人色91 |