一个不需要第三方组件,可实现华简单图形的类
来源:百度文库 编辑:神马文学网 时间:2024/03/29 14:18:12
通常我们做统计图的时候需要借助组件来完成例如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 = "http://www.intelidev.com"
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 & "" & vbNewLine
" & vbNewLine
Next
ElseIf LCase( Orientation ) = "vertical" Then
data = "
" & vbNewLine
End If
Build = data
End Function
End Class
%>
使用方法
这个类一共有四个属性
BarWidth(图片条的尺寸)
BarColor*(图片条颜色)
Maximum(图片条最大长度)
Orientation(方向)
有两个函数
Add( value )添加图片条到图片中
Build()建立图片
事例:
<%
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() )
%>
但是这个类不需要任何组件,而且使用方便
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 = "http://www.intelidev.com"
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 & "
" | " |
Next
ElseIf LCase( Orientation ) = "vertical" Then
data = "
| " & vbNewLine
End If
Build = data
End Function
End Class
%>
使用方法
这个类一共有四个属性
BarWidth(图片条的尺寸)
BarColor*(图片条颜色)
Maximum(图片条最大长度)
Orientation(方向)
有两个函数
Add( value )添加图片条到图片中
Build()建立图片
事例:
<%
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() )
%>
一个不需要第三方组件,可实现华简单图形的类
实现图形JSF组件
在delphi7中不使用任何第三方控件,实现放在工具栏上可拖动的xp风格菜单.
一个简单的驱动程序,可实现字节型端口I/O。(访问物理端口)
一个简单的不需要gd库的验证码方案
苹果iPhone实现利用第三方的应用软件
--利用Compass实现一个简单的搜索引擎
SWT:实现自我绘制的Button组件
一个简单实用的壮阳方
Windows Forms中通过自定义组件实现统一的数据验证(一) - 一个程序员的自省 ...
Struts中一个简单的tiles的实现步骤
一个可识别联合(Discriminated Unions)的C++实现
利用Compass实现一个简单的搜索引擎[转贴]
利用Compass实现一个简单的搜索引擎[转贴] - 刘文涛 - BlogJava
Java组件开发的一个概念框架
计算机科学论坛--一个yale-cas实现单点登录的简单例子实现
深入讨论通用权限组件的理论和设计实现。
深入讨论通用权限组件的理论和设计实现。
互联网实验室 :: 第三方导航,实现个人博客品牌化
Delphi中不使用第三方控件实现XP风格
如何用第三方轻松实现免费转账
手机的第三方软件
第三方物流的定义
第三方物流的作用