Home > Software engineering >  Small white ask two questions about the teechart, o great god appeared
Small white ask two questions about the teechart, o great god appeared

Time:10-06

I assume that the five points to draw a line graph, abscissa point is time, ordinate is his own blind set value, the figure has two problems, one is the map is the line chart, how to make the chart a smooth curve, the second is not such as abscissa is interval display (pictured), the code below:
Private Sub Form_click ()
TChart1. Aspect. View3D=False
TChart1. AddSeries (scLine)
Dim x (4) As the Date, y (4) As an Integer
X (0)=# # 5/2/1992
Y (0)=1
X (1)=# # 5/3/1992
Y (1)=50
X (2)=# # 5/4/1992
Y (2)=144
X (3)=# # 5/5/1992
Y (3)=200
X (4)=# # 5/7/1992
Y (4)=301

Dim I
For I=0 To 4
TChart1. Series (0). The Add y (I), x (I), vbGreen
Next I

With TChart1. Axis. Bottom
Abscissa. Labels.=45 'Angle label any degree according to
End With
End Sub
Private Sub Form_click ()
TChart1. Aspect. View3D=False
TChart1. AddSeries (scLine)
Dim x (4) As the Date, y (4) As an Integer
X (0)=# # 5/2/1992
Y (0)=1
X (1)=# # 5/3/1992
Y (1)=50
X (2)=# # 5/4/1992
Y (2)=144
X (3)=# # 5/5/1992
Y (3)=200
X (4)=# # 5/7/1992
Y (4)=301

Dim I
For I=0 To 4
TChart1. Series (0). The Add y (I), x (I), vbGreen
Next I

With TChart1. Axis. Bottom
Abscissa. Labels.=45 'Angle label any degree according to
End With
End Sub

  • Related