I am using Using TeeChart Pro 7.0.0.6 with FastLine series. When I set AutoSizeVertAxis=false and zoom into the series while new points are still being added via AddRealTime, any new points that fall outside the chart area are still being painted onto the panel on top of chart titles, legends, etc. I have set ClipPoints=True, but that doesn't seem to make a difference. Is this an artifact of using the FastLine approach?
Thanks,
-Scott
FastLine points being drawn outside chart area
Hi Scott,
I cannot reproduce the problem using the following code :
Could you please modify and post it here so I can reeproduce the problem here ?
I cannot reproduce the problem using the following code :
Code: Select all
Private Sub Check1_Click()
With TChart1
.Series(0).asFastLine.AutoSizeVertAxis = Check1.Value
If .Series(0).asFastLine.AutoSizeVertAxis = False Then
.Axis.Left.SetMinMax 30, 70
.Repaint
End If
End With
End Sub
Private Sub Form_Load()
With TChart1
.Aspect.View3D = False
.AddSeries scFastLine
.Series(0).XValues.DateTime = True
.Axis.Bottom.Labels.Angle = 90
.Axis.Bottom.Labels.DateTimeFormat = "hh:mm:ss"
.Series(0).asFastLine.AddRealTime Now, Rnd * 100
.Axis.Bottom.SetMinMax Now - 8 / 86400, Now + 2 / 86400
.TimerEnabled = True
.TimerInterval = 1000
End With
Check1.Value = 1
End Sub
Private Sub TChart1_OnAfterDraw()
Check1_Click
End Sub
Private Sub TChart1_OnTimer()
With TChart1
.Series(0).asFastLine.AddRealTime Now, Rnd * 100
.Axis.Bottom.SetMinMax Now - 8 / 86400, Now + 2 / 86400
End With
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com
If you comment out the .Axis.Bottom.SetMinMax statement in the OnTimer event, you should be able to reproduce the problem.Pep wrote:Hi Scott,
I cannot reproduce the problem using the following code :Could you please modify and post it here so I can reeproduce the problem here ?Code: Select all
Private Sub TChart1_OnTimer() With TChart1 .Series(0).asFastLine.AddRealTime Now, Rnd * 100 ' .Axis.Bottom.SetMinMax Now - 8 / 86400, Now + 2 / 86400 End With End Sub
Thanks for your help,
-Scott
Hi Scott,
yes, you're correct, to solve it you can do :
yes, you're correct, to solve it you can do :
Code: Select all
Private Sub TChart1_OnSeriesBeforeAdd(ByVal SeriesIndex As Long, MoreValues As Boolean)
TChart1.Canvas.ClipRectangle TChart1.Axis.Left.Position, TChart1.Axis.Top.Position, TChart1.Axis.Right.Position, TChart1.Axis.Bottom.Position
End Sub
Pep Jorge
http://support.steema.com
http://support.steema.com
This work around seems to solve the problem. Thanks for your help.Pep wrote:Hi Scott,
yes, you're correct, to solve it you can do :Code: Select all
Private Sub TChart1_OnSeriesBeforeAdd(ByVal SeriesIndex As Long, MoreValues As Boolean) TChart1.Canvas.ClipRectangle TChart1.Axis.Left.Position, TChart1.Axis.Top.Position, TChart1.Axis.Right.Position, TChart1.Axis.Bottom.Position End Sub
-Scott