p;
With ChartSpace1.ChartSpaceLegend
.Position = c.chLegendPositionright
.Font.Color = "#009999"
.Font.Size = 9
End with
'' 设置图表类型(具体样式见附录)
ChartSpace1.Charts(0).Type = c.chChartTypeBarClustered
'' 轴的坐标格式、样式(有坐标轴时才设)
With ChartSpace1.Charts(0).Axes(c.chAxisPositionBottom)
.NumberFormat = "#,##0"
.Font.Size = 9
End with
With ChartSpace1.Charts(0).Axes(c.chAxisPositionLeft)
.Font.Color = "#0000ff"
.Font.Size = 9
End with
end if
End Sub
</script>
</BODY>
</HTML>
以上
程序在Win98+PWS 下通过。
通过以上的例程你可以根据你的需要,增加自己所需要的效果,一定能制作出极酷的统计图表来的,需要帮助可以参见微软的帮助文件(装了 Office2000 就有)Msowcvba.chm 以及MSDN 在线帮助。
有个缺点:客户端好像也要装Office2000 才行,另外我还没找到如何不安装 Office2000 来
注册该组件的方法,如果那位高手知道,请告诉我 luo_zhenyu@netease.com ,谢谢!
附:
ChartChartTypeEnum Constants 图表类型常数(转至MSDN)
Constant Value
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
chCh