MSChart控件有什么方法能清除以前的图形,
PICTURE控件有.CLEAR方法能清除,MSChart控件呢?我想用一个Timer 触发获取一些数据,让这个控件显示另一块不同的数据,它提示给定索引越界 如何处理?
Private Sub Command6_Click()
Dim arrData(1 To 3, 1 To 3)
MSChart1.ShowLegend = True
arrData(1, 1) = "一月" ' 在第一列设置标签。
arrData(2, 1) = "二月"
arrData(3, 1) = "三月"
arrData(1, 2) = 8
arrData(2, 2) = 4
arrData(3, 2) = 0.3
arrData(1, 3) = 0.2
arrData(2, 3) = 3
arrData(3, 3) = 6.3
MSChart1.ChartData = arrData
MSChart1.Plot.SeriesCollection(1).LegendText = "损耗额(百万)"
MSChart1.Plot.SeriesCollection(2).LegendText = "利润额(百万)"
End Sub