温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:简单饼型图报表源码
当前文件:
VisualReport/VisualReport_Source/Report_Chart/Chart.cs[1K,2009-6-12 11:57:57],打开代码结构图
VisualReport/VisualReport_Source/Report_Chart/Chart.cs[1K,2009-6-12 11:57:57],打开代码结构图1namespace Report_Chart 2
{ 3
using System; 4
using System.Drawing; 5
6
public abstract class Chart 7
{ 8
private Color[] _color = new 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 }; 9
private const int _colorLimit = 12; 10
private ChartItem.ChartItemsCollection _dataPoints = new ChartItem.ChartItemsCollection(); 11
12
public abstract Bitmap Draw(); 13
public Color GetColor(int index) 14
{ 15
if (index >= 12) 16
{ 17
throw new Exception("棰滆壊鐨勭晫闄愭槸" + Convert.ToString(12)); 18
} 19
return this._color[index]; 20
} 21
22
public void SetColor(int index, Color NewColor) 23
{ 24
if (index >= 12) 25
{ 26
throw new Exception("棰滆壊鐨勭晫闄愭槸" + Convert.ToString(12)); 27
} 28
this._color[index] = NewColor; 29
} 30
31
public ChartItem.ChartItemsCollection DataPoints 32
{ 33
get 34
{ 35
return this._dataPoints; 36
} 37
set 38
{ 39
this._dataPoints = value; 40
} 41
} 42
} 43
} 44
45






}
}