Thank you for your prompt reaction.
But your suggestion does not solve my problem.
No.1 is your example and No2 is modified it.
No.1 program work fine but No.2 does not work correctly.
Please check again and teach me what is wrong. Thank you in advance.
'------------------------------- No1 --------------------------------------
Dim t As Integer
Private Sub Form_Load()
With TChart1
.AddSeries scFastLine
.TimerEnabled = True
.TimerInterval = 100
End With
End Sub
Private Sub TChart1_OnTimer()
t = t + 1
TChart1.Series(0).asFastLine.AddRealTime t, Cos(t), "", clTeeColor
End Sub
'------------------------------No2(fro example)--------------------------------
Dim t As Double
Private Sub Form_Load()
With TChart1
.AddSeries scFastLine
.Series(0).XValues.DateTime = True
.TimerEnabled = True
.TimerInterval = 1000
End With
t= CDbl(Now)
End Sub
Private Sub TChart1_OnTimer()
t = DateAdd("s", 1, t)
TChart1.Series(0).asFastLine.AddRealTime t, Cos(t), "", clTeeColor
End Sub
Again(Datetime in Addrealtime does not work)
Hi,
if you want the exmple No.2 work in the same way as the example No.1 but showing datetime axis labels you should use the following code :
if you want the exmple No.2 work in the same way as the example No.1 but showing datetime axis labels you should use the following code :
Code: Select all
'------------------------------No2(fro example)--------------------------------
Dim t As Double
Private Sub Form_Load()
With TChart1
.AddSeries scFastLine
.Series(0).XValues.DateTime = True
.TimerEnabled = True
.TimerInterval = 100
.Axis.Bottom.Labels.Angle = 90
.Axis.Bottom.Labels.DateTimeFormat = "hh:mm:ss"
End With
t = CDbl(Now)
End Sub
Private Sub TChart1_OnTimer()
t = DateAdd("d", 1, t)
TChart1.Series(0).asFastLine.AddRealTime t, Cos(t), "", clTeeColor
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com