Problems with the downsample function
Problems with the downsample function
I've been using TeeChart for .Net but am currently evaluating the ActiveX version for a new project. The ActiveX version seems to handle large amounts of data much more efficiently but I have run into a couple problems.
1. I can't seem to get the downsample function to work correctly when the x axis is set to Datetime. The only DownSampleMethod that results in something other then 1 or 2 datapoints is TeeChart.EDownSampleMethod.dsDouglas.
However the results from dsDouglas still appear to be wrong, there are large groups of data points which seem to be skipped.
This can easily be reproduced by changing the code of the 'Reducing Number of Points' demo.
Just change fillsamples to a loop calling addxy (adding datetimes) and configure the series to use datetimes.
2. Is there no equivalent in the ActiveX version to DisplayedPointCount. I found this property to be a much more effective way of limiting the user from information overload then the tolerance property. It also let the user step into the hidden data when zooming.
Kind regards,
Jerron
1. I can't seem to get the downsample function to work correctly when the x axis is set to Datetime. The only DownSampleMethod that results in something other then 1 or 2 datapoints is TeeChart.EDownSampleMethod.dsDouglas.
However the results from dsDouglas still appear to be wrong, there are large groups of data points which seem to be skipped.
This can easily be reproduced by changing the code of the 'Reducing Number of Points' demo.
Just change fillsamples to a loop calling addxy (adding datetimes) and configure the series to use datetimes.
2. Is there no equivalent in the ActiveX version to DisplayedPointCount. I found this property to be a much more effective way of limiting the user from information overload then the tolerance property. It also let the user step into the hidden data when zooming.
Kind regards,
Jerron
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Jerron,
Please find below the answers to your questions:
1. Code below works fine for me here using TeeChart Pro v8.0.0.2 ActiveX which is the latest version available at the client area. Which version are you using exactly? Could you please modify the code below so that we can reproduce the problem here?
Thanks in advance.
2. You can try using this:
Please find below the answers to your questions:
1. Code below works fine for me here using TeeChart Pro v8.0.0.2 ActiveX which is the latest version available at the client area. Which version are you using exactly? Could you please modify the code below so that we can reproduce the problem here?
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, 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.DownSampleMethod = dsAverage
.Series(1).DataSource = TChart1.Series(0)
End With
End Sub
2. You can try using this:
Code: Select all
TChart1.Series(1).VisibleCount
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 |
Hi Narcis,
Thanks for the quick response.
I added the code in the sample project and it didn’t work. I am using v8.0.0.1.10507 so I am hoping it’s something that got fixed and not something I corrupted in the sample project. Would you mind testing with the older version as the version I have is the evaluation version and I can’t upgrade.
As for number 2 I don’t think I explained what I was looking for well enough.
TChart1.Series(1).VisibleCount appears to be a function call that returns the amount of data points that are currently shown on the graph.
In TeeChart For .Net there is a property in the downsampling function that can be used instead of Tolerance, that is the DisplayedPointCount property.
If I set this property to 1000 it limits the amount of data points shown to 1000.
If I have 20,000 or 30,000 data points and I zoom out all the way, I will see 1000 data points. Then when I zoom in to show half of the graph I still see 1000 data points.
There is an example of this in your TeeChart for .Net Examples in all features/functions/extended/reducing number of points/downsampling additions.
I found this to be a really handy property but I’m suspecting there is no such equivalent in your activex version. Hopefully I’m wrong and you can point me in the right direction. If not, what would that chances be of this being added to your activex version?
Best regards,
Jerron
Thanks for the quick response.
I added the code in the sample project and it didn’t work. I am using v8.0.0.1.10507 so I am hoping it’s something that got fixed and not something I corrupted in the sample project. Would you mind testing with the older version as the version I have is the evaluation version and I can’t upgrade.
As for number 2 I don’t think I explained what I was looking for well enough.
TChart1.Series(1).VisibleCount appears to be a function call that returns the amount of data points that are currently shown on the graph.
In TeeChart For .Net there is a property in the downsampling function that can be used instead of Tolerance, that is the DisplayedPointCount property.
If I set this property to 1000 it limits the amount of data points shown to 1000.
If I have 20,000 or 30,000 data points and I zoom out all the way, I will see 1000 data points. Then when I zoom in to show half of the graph I still see 1000 data points.
There is an example of this in your TeeChart for .Net Examples in all features/functions/extended/reducing number of points/downsampling additions.
I found this to be a really handy property but I’m suspecting there is no such equivalent in your activex version. Hopefully I’m wrong and you can point me in the right direction. If not, what would that chances be of this being added to your activex version?
Best regards,
Jerron
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Jerron,
This works fine for me here using the evaluation version, same build as you. You just need to drop a TeeChart in a VB form and add the code I posted in the form's OnLoad event.I added the code in the sample project and it didn’t work. I am using v8.0.0.1.10507 so I am hoping it’s something that got fixed and not something I corrupted in the sample project. Would you mind testing with the older version as the version I have is the evaluation version and I can’t upgrade.
Thanks for the information. I'm afraid this property doesn't exist in the ActiveX and VCL versions. I'll add your request to our wish-list to be implemented for future releases.I found this to be a really handy property but I’m suspecting there is no such equivalent in your activex version. Hopefully I’m wrong and you can point me in the right direction. If not, what would that chances be of this being added to your activex version?
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 |
Hi Narcis,
I did a little more investigating, watch what happens to your same code when instead of adding days as your increments you add hours, i / 24
then minutes, then seconds, then milliseconds. The smaller the interval the more aggressive the downsamling function becomes. Eventually resulting in very few data points, 1 or 2 maybe.
This made me curious as to whether this would happen with the tolerance property in .Net version. I haven't had much time to debug it but you might want to take a look in there too because when I tried, my app started to freeze.
Best regards,
Jerron
I did a little more investigating, watch what happens to your same code when instead of adding days as your increments you add hours, i / 24
then minutes, then seconds, then milliseconds. The smaller the interval the more aggressive the downsamling function becomes. Eventually resulting in very few data points, 1 or 2 maybe.
This made me curious as to whether this would happen with the tolerance property in .Net version. I haven't had much time to debug it but you might want to take a look in there too because when I tried, my app started to freeze.
Best regards,
Jerron
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Jerron,
Sorry for the delayed reply. Yes, I was able to reproduce the issue here but we need some time to investigate it. We will get back to you ASAP.
Sorry for the delayed reply. Yes, I was able to reproduce the issue here but we need some time to investigate it. We will get back to you ASAP.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Jerron,
We have been investigating the issue here and we found that this only happens when using decimal DateTime values (interval smaller than one day). This seems a bug to us and added it (TV52012677) to our defect list to be fixed for future releases
We have been investigating the issue here and we found that this only happens when using decimal DateTime values (interval smaller than one day). This seems a bug to us and added it (TV52012677) to our defect list to be fixed for future releases
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Jerron,
Ok, I've increased both issues priority on the list.
Ok, I've increased both issues priority on the list.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi jer_m,
No, any of them has been implemented yet.
No, any of them has been implemented yet.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Jerron,
Find below an update on the status of the issues you requested.
1.
This is being reviewed now. When we have a fix available we will send you a pre-release version for tests.
2.
Find below an update on the status of the issues you requested.
1.
Downsampling does not work with decimal numbers
This is being reviewed now. When we have a fix available we will send you a pre-release version for tests.
2.
The .NET DownSampling Function has been extensively on-developed as a result of projectwork specific to .NET. The DisplayedPointCount property is a minor part of the new functionality. We would expect to introduce the new features in the next major version upgrade for the ActiveX version.There is no DisplayedPointCount property as there is in the .Net version (this one is a feature request but seems to be a major oversight that this wasn’t included in the activex version)
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Jerron,
Below there’s an update on the DownSampling issue:
We've done some tests to see where weaknesses might lie in the Downsampling's treatment of data. We may still be missing some aspects that apply to your projects but we think the key to satisfactory results lies with use of the Tolerance property. The NET and AX versions behave similarly with the same test data/settings.
As a benchmark the following works ok (same applies to VB or in C#, AX or NET versions):
Bringing down the Y value range (sub 1 values), the following fails to return more than 2 points in the function:
Using that as a basis symptom to run checks, it becomes clear that tolerances of greater than 1 for sub 1 values won't give high function point returns. Tolerance should be adjusted to the sub 1 range:
eg. run same again but using:
Returns a useable level of data points.
The key seems to be the value range of the Y values (or at least the range of values to which the DownSample is applied), not the X values, thus setting datetime to true shouldn't affect the result. (ie. .Series(0).XValues.DateTime = True does not affect result). As previously discussed, a DisplayedPointCount property in the AX version would simplify setting this up, so has been added as a feature request for the next major upgrade release. We will improve the documentation for the Tolerance property to help clarify it's use.
Below there’s an update on the DownSampling issue:
We've done some tests to see where weaknesses might lie in the Downsampling's treatment of data. We may still be missing some aspects that apply to your projects but we think the key to satisfactory results lies with use of the Tolerance property. The NET and AX versions behave similarly with the same test data/settings.
As a benchmark the following works ok (same applies to VB or in C#, AX or NET versions):
Code: Select all
With TChart1
.Series(0).Clear
.Series(0).XValues.DateTime = False
.Series(0).FillSampleValues (200) 'random fill
For i = 0 To 199
.Series(0).YValues.Value(i) = Rnd * 100
Next i
.Series(1).FunctionType.asDownSampling.Tolerance = 1
.Series(1).FunctionType.asDownSampling.DownSampleMethod = dsDouglas
.Series(1).CheckDataSource
End With
Bringing down the Y value range (sub 1 values), the following fails to return more than 2 points in the function:
Code: Select all
With TChart1
.Series(0).Clear
.Series(0).XValues.DateTime = False
.Series(0).FillSampleValues (200) 'random fill
For i = 0 To 199
.Series(0).YValues.Value(i) = Rnd * 1 '* 1 to focus that vals are < 1
Next i
.Series(1).FunctionType.asDownSampling.Tolerance = 1
.Series(1).FunctionType.asDownSampling.DownSampleMethod = dsDouglas
.Series(1).CheckDataSource
End With
Using that as a basis symptom to run checks, it becomes clear that tolerances of greater than 1 for sub 1 values won't give high function point returns. Tolerance should be adjusted to the sub 1 range:
eg. run same again but using:
Code: Select all
.Series(1).FunctionType.asDownSampling.Tolerance = 0.1
Returns a useable level of data points.
The key seems to be the value range of the Y values (or at least the range of values to which the DownSample is applied), not the X values, thus setting datetime to true shouldn't affect the result. (ie. .Series(0).XValues.DateTime = True does not affect result). As previously discussed, a DisplayedPointCount property in the AX version would simplify setting this up, so has been added as a feature request for the next major upgrade release. We will improve the documentation for the Tolerance property to help clarify it's use.
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 |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hello Jerron,
DownSampling function has now been implemented as it’s in v3 .NET for v8 VCL and ActiveX. This means DisplayedPointCount property has also been included. Those changes will be available in next maintenance release.
Fixing TV52012677 is a more complicated task as it would involve a redesign of DownSampling function.
DownSampling function has now been implemented as it’s in v3 .NET for v8 VCL and ActiveX. This means DisplayedPointCount property has also been included. Those changes will be available in next maintenance release.
Fixing TV52012677 is a more complicated task as it would involve a redesign of DownSampling function.
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 |