Again(Datetime in Addrealtime does not work)
Posted: Wed Jan 18, 2006 11:03 am
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
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