LOGO OA教程 ERP教程 模切知识交流 PMS教程 CRM教程 开发文档 其他文档  
 
网站管理员

一个不需要第三方组件,可实现华简单图形的类

admin
2010年7月8日 0:34 本文热度 4990
[p]通常我们做统计图的时候需要借助组件来完成例如mschart,aspchart等[br]但是这个类不需要任何组件,而且使用方便[br]clsgraph.asp [br]<%[br]class inteligraph [/p] [p][br]public copyright, developer, name, version, web[br]public maximum, barwidth, barcolor, orientation[br]private items(), cnt[/p] [p]private sub class_initialize()[br]copyright = "?2001 ticluse teknologi, all rights reserved."[br]developer = "james lind雗"[br]name = "inteligraph"[br]version = "1.0"[br]web = "[url=http://intelidev.com]http://intelidev.com[/url]"[br]cnt = 0[br]end sub[/p] [p]public function add( value )[br]redim preserve items( cnt )[br]items( cnt ) = value[br]data = cnt[br]cnt = cnt + 1[br]add = data[br]end function[/p] [p]public function build()[br]if cnt < 1 then exit function[br]if len( orientation ) = 0 or lcase( orientation ) = "horizontal" then[br]for idx = lbound( items ) to ubound( items )[br]data = data & "" & vbnewline[br]data = data & vbtab & ""[br]if items(idx) < maximum then[br]data = data & ""[br]end if[br]data = data & "" & vbnewline & "
" & vbnewline[br]next[br]elseif lcase( orientation ) = "vertical" then[br]data = "" & vbnewline[br]for idx = lbound( items ) to ubound( items )[br]data = data & "" & vbnewline[br]next[br]data = data & "
" & vbnewline[br]if items(idx) < maximum then[br]data = data & ""[br]end if[br]data = data & vbtab & ""[br]data = data & "" & vbnewline & "
" & vbnewline & "
" & vbnewline[br]end if[br]build = data[br]end function[/p] [p]end class[br]%>[br]使用方法[br]这个类一共有四个属性[br]barwidth(图片条的尺寸)[br]barcolor*(图片条颜色)[br]maximum(图片条最大长度)[br]orientation(方向)[br]有两个函数[br]add( value )添加图片条到图片中[br]build()建立图片[br]事例:[br][br]<%[br]public const vert = "vertical"[br]public const horz = "horizontal"[/p] [p]dim graph[/p] [p]set graph = new inteligraph[br]graph.barwidth = 10[br]graph.barcolor = "blue"[br]graph.maximum = 100[br]graph.orientation = horz[/p] [p]for idx = 0 to 100 step 25[br]graph.add( idx )[br]next[/p] [p]response.write( graph.build() )[br]%>[/p]

该文章在 2010/7/8 0:34:31 编辑过
关键字查询
相关文章
正在查询...
点晴ERP是一款针对中小制造业的专业生产管理软件系统,系统成熟度和易用性得到了国内大量中小企业的青睐。
点晴PMS码头管理系统主要针对港口码头集装箱与散货日常运作、调度、堆场、车队、财务费用、相关报表等业务管理,结合码头的业务特点,围绕调度、堆场作业而开发的。集技术的先进性、管理的有效性于一体,是物流码头及其他港口类企业的高效ERP管理信息系统。
点晴WMS仓储管理系统提供了货物产品管理,销售管理,采购管理,仓储管理,仓库管理,保质期管理,货位管理,库位管理,生产管理,WMS管理系统,标签打印,条形码,二维码管理,批号管理软件。
点晴免费OA是一款软件和通用服务都免费,不限功能、不限时间、不限用户的免费OA协同办公管理系统。
Copyright 2010-2024 ClickSun All Rights Reserved