Private Sub Command1_Click() Dim a(4) As Integer For i = 0 To 4 a(i) = i Next MSChart1.chartType = VtChChartType2dPie '2维饼图 MSChart1.ChartData = a() End Sub
问题我解决了。但是这样总是出错,问题是越界。请大家指点一下。rs.MoveFirst For i = 1 To NumPoints MSChart1.Plot.SeriesCollection(i).LegendText = rs.Fields(strArr(1)) rs.MoveNext Next i
With MSChart1 .ColumnCount = 2 .RowCount = 3 For column = 1 To 2 For i = 1 To 3 .column = column .ColumnLabel = "应收款" ‘C1,C2,C3,C4 .row = i .RowLabel = pricers!consdate‘R1,R2,R3,R4,R5 .Data = pricers!moneyup
Dim a(4) As Integer
For i = 0 To 4
a(i) = i
Next
MSChart1.chartType = VtChChartType2dPie '2维饼图
MSChart1.ChartData = a()
End Sub
For i = 1 To NumPoints
MSChart1.Plot.SeriesCollection(i).LegendText = rs.Fields(strArr(1))
rs.MoveNext
Next i
.ColumnCount = 2
.RowCount = 3
For column = 1 To 2
For i = 1 To 3
.column = column
.ColumnLabel = "应收款" ‘C1,C2,C3,C4
.row = i
.RowLabel = pricers!consdate‘R1,R2,R3,R4,R5
.Data = pricers!moneyup
NEXT
NEXT
End With
功能特点:
1、多种样式统计图表制作,包括柱状图,折线图,饼图,柏拉图,点状图等;
2、输出多种格式文件,包括BMP,JPG,GIF等格式,输出质量自定义;
3、可在任意位置添加线条、文字、图片;
4、可将统计结果直接输出到浏览器,包括BMP,JPG和GIF格式;
5、柱状图表支持序列数据组比较;
6、图表填充方式支持图片填充;
7、数十个属性灵活控制图表布局和外观;
8、支持鼠标移上显示数据功能;
9、组件用于WEB开发时只需要服务器端注册即可,无须客户端安装。
10、性能稳定,消耗系统资极少,无内存泄露。