Thats great news, I will be looking forward to trying it out.
Thank you Narcís,
Jerron
Problems with the downsample function
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Jerron,
I have just sent you an e-mail with the URL to download the new ocx and a simple example.
I have just sent you an e-mail with the URL to download the new ocx and a simple example.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Problems with the downsample function
Hi, I still couldn't find any sample code with DisplayedPointCount after searching in the feature demo code, nor can I find any info from the help file. I am using the latest 8.0.0.7. Woudl anyone please let me know where I can find some info about it?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Problems with the downsample function
Hi David,
You'll find a little explanation here.
A couple examples are those:
The example below allows zooming the function taking DisplayedPointCount into account.
You'll find a little explanation here.
A couple examples are those:
Code: Select all
Private Sub Form_Load()
With TChart1
.Aspect.View3D = False
.AddSeries scPoint
Dim tmp As Date
tmp = Now
For i = 0 To 200
.Series(0).AddXY tmp + i / 24, Rnd, "", clTeeColor
Next
.Series(0).XValues.DateTime = True
.Series(0).asPoint.Pointer.VerticalSize = 1
.Series(0).asPoint.Pointer.HorizontalSize = 1
.Series(0).asPoint.Pointer.Pen.Visible = False
.AddSeries scLine
.Series(1).SetFunction tfDownSampleFun
'.Series(1).FunctionType.asDownSampling.Tolerance = 4
.Series(1).FunctionType.asDownSampling.DisplayedPointCount = .Series(0).Count * 0.8
.Series(1).FunctionType.asDownSampling.DownSampleMethod = dsAverage
.Series(1).DataSource = TChart1.Series(0)
End With
End Sub
Code: Select all
Private Sub Form_Load()
With TChart1
.Aspect.View3D = False
.Zoom.Direction = tzdHorizontal
.AddSeries scPoint
.AddSeries scFastLine
For i = 0 To 20000
If i Mod 20 = 0 Then
.Series(0).AddNull ""
Else
.Series(0).Add Rnd * 100, "", clTeeColor
End If
Next
.Series(0).Active = False
.Series(1).asFastLine.TreatNulls = tnDontPaint
.Series(1).DataSource = .Series(0)
.Series(1).SetFunction tfDownSampleFun
.Series(1).FunctionType.asDownSampling.DisplayedPointCount = 1000
.Series(1).FunctionType.asDownSampling.DownSampleMethod = dsMinMax
End With
End Sub
Private Sub TChart1_OnUndoZoom()
TChart1.Axis.Bottom.SetMinMax 0, TChart1.Series(0).Count
TChart1.Series(1).CheckDataSource
End Sub
Private Sub TChart1_OnZoom()
TChart1.Series(1).CheckDataSource
End Sub
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |