发布网友 发布时间:2022-04-24 19:53
共2个回答
热心网友 时间:2023-10-09 04:18
试试如下代码:Chart1.Series("Series1").Clear()VB不懂的,应该和C#是类似,你试一试能不能行,有问题请追问或是Hi,希望对你有帮助热心网友 时间:2023-10-09 04:19
Dim testdata(1 To 24, 1 To 5) '职称数 Private Sub Form_Load() Dim srow, scol As Integer testdata(1, 1) = "A" ' 在第一列设置标签。 testdata(2, 1) = "B" testdata(3, 1) = "C" testdata(4, 1) = "D" testdata(5, 1) = "E" For srow = 1 To 24 For scol = 1 To 5 testdata(srow, scol) = testdata(srow, scol) Next scol Next srow MSChart1.Legend.Location.LocationType = VtChLocationTypeBottom '图例在图表下方 With MSChart1 .ColumnCount = 4 .ChartData = testdata .DataGrid.ColumnLabel(1, 1) = "tushi" .DataGrid.ColumnLabel(2, 1) = "2C" .DataGrid.ColumnLabel(3, 1) = "3D" .DataGrid.ColumnLabel(4, 1) = "4E" '.DataGrid.ColumnLabel(5, 1) = "5" '.DataGr