利用Office Chart 制作柱图(一个柱子)
语言:VBScript 、C#
步骤:
1.单击“工具箱-添加/移除项”,弹出“自定义工具箱”;
2.点击“COM组件”,选择“Microsoft Office Chart 11.0”然后确定,此时工具栏上出现“Microsoft Office Chart 11.0”的图标;
3..aspx的后台代码如下:
柱图:
注意:
1。<OBJECT>控件放在<form>外,负责提示“缺少对象”的错误!
2。修改柱子的颜色:Interior.Color
3。categories和values1从数据库中的读取方法:
categories="<%=Categories%>"
values1="<%=values1%>"
其中的Categories和values1是后台定义的全局(string类型)变量,赋上相应值即可,注意要用制表符分割。C#中的制表符:(char)(9)
4。图类型:
1-5 普通柱子
6-11 折线
12-17 正弦线
18-20 饼图
21-26 分散
27-28 气泡
29-31 填充
32-33 油炸圈饼
34-38 雷达线
39-40
41-45 北极图
46-53 立体柱图
54-57 立体折线图
58-59 立体饼图
60-63 立体填充图
chChartTypeCombo -1
chChartTypeColumnClustered 0
chChartTypeColumnStacked 1
chChartTypeColumnStacked100 2
chChartTypeBarClustered 3
chChartTypeBarStacked 4
chChartTypeBarStacked100 5
chChartTypeLine 6
chChartTypeLineMarkers 7
chChartTypeLineStacked 8
chChartTypeLineStackedMarkers 9
chChartTypeLineStacked100 10
chChartTypeLineStacked100Markers 11
chChartTypeSmoothLine 12
chChartTypeSmoothLineMarkers 13
chChartTypeSmoothLineStacked 14
chChartTypeSmoothLineStackedMarkers 15
chChartTypeSmoothLineStacked100 16
chChartTypeSmoothLineStacked100Markers 17
chChartTypePie 18
chChartTypePieExploded 19
chChartTypePieStacked 20
chChartTypeScatterMarkers 21
chChartTypeScatterSmoothLineMarkers 22
chChartTypeScatterSmoothLine 23
chChartTypeScatterLineMarkers 24
chChartTypeScatterLine 25
chChartTypeScatterLineFilled 26
chChartTypeBubble 27
chChartTypeBubbleLine 28
chChartTypeArea 29
chChartTypeAreaStacked 30
chChartTypeAreaStacked100 31
chChartTypeDoughnut 32
chChartTypeDoughnutExploded 33
chChartTypeRadarLine 34
chChartTypeRadarLineMarkers 35
chChartTypeRadarLineFilled 36
chChartTypeRadarSmoothLine 37
chChartTypeRadarSmoothLineMarkers 38
chChartTypeStockHLC 39
chChartTypeStockOHLC 40
chChartTypePolarMarkers 41
chChartTypePolarLine 42
chChartTypePolarLineMarkers 43
chChartTypePolarSmoothLine 44
chChartTypePolarSmoothLineMarkers 45