在线等,高分求解VB控件问题

来源:百度知道 编辑:UC知道 时间:2024/06/02 13:36:40
采用VB中的Mschart控件实现了直方图和饼图的功能,可是不会在直方图和饼图上显示数据和百分比,望高手帮忙,HI我

给一小段代码,你应该明白怎么操作了。
Private Sub Form_Load()
Dim I As Integer
With MSChart1
.ColumnCount = 1
.RowCount = 10
End With
Randomize
For I = 1 To 10
With MSChart1
.Row = I
.Data = Int(Rnd * 100)
.Plot.SeriesCollection(1).DataPoints(-1).DataPointLabel.LineStyle = VtChLabelLineStyleBent
.Plot.SeriesCollection(1).DataPoints(-1).DataPointLabel.LocationType = VtChLabelLocationTypeOutside
End With
Next I
End Sub