visual studio中利用VB使用chart绘图
发布网友
发布时间:2022-04-30 19:48
我来回答
共1个回答
热心网友
时间:2022-06-30 06:31
Private Sub Command1_Click()
MSChart1.chartType = VtChChartType2dXY
Dim arrValues()
ReDim arrValues(0 To 10, 1 To 2)
Dim i As Integer
For i = 10 To 100 Step 10
arrValues(i / 10 - 1, 1) = i 'x
Next
For j = 1 To 10
arrValues(j - 1, 2) = j 'y
Next
MSChart1.ChartData = arrValues
End Sub