?? chart.vb
字號:
Imports System
Imports System.Drawing
Imports System.Collections
Namespace ComponenteGrafico
'*********************************************************************
' http://www.asp.net
' StartKIT
' Chart Class
'
' Base class implementation for BarChart and PieChart
'
'*********************************************************************
Public MustInherit Class Chart
Private _colorLimit As Integer = 12
Private _color As Color() = {Color.Chocolate, Color.YellowGreen, Color.Olive, Color.DarkKhaki, Color.Sienna, Color.PaleGoldenrod, Color.Peru, Color.Tan, Color.Khaki, Color.DarkGoldenrod, Color.Maroon, Color.OliveDrab}
' Represent collection of all data points for the chart
Private _dataPoints As New ChartItemsCollection
' The implementation of this method is provided by derived classes
Public MustOverride Function Draw() As Bitmap
Public Property DataPoints() As ChartItemsCollection
Get
Return _dataPoints
End Get
Set(ByVal Value As ChartItemsCollection)
_dataPoints = Value
End Set
End Property
Public Sub SetColor(ByVal index As Integer, ByVal NewColor As Color)
If index < _colorLimit Then
_color(index) = NewColor
Else
Throw New Exception("Color Limit is " + _colorLimit)
End If
End Sub 'SetColor
Public Function GetColor(ByVal index As Integer) As Color
If index < _colorLimit Then
Return _color(index)
Else
Throw New Exception("Color Limit is " + _colorLimit)
End If
End Function 'GetColor
End Class 'Chart
End Namespace
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -