IDownSamplingFunction for decimal x values

TeeChart for ActiveX, COM and ASP
Post Reply
yvb
Newbie
Newbie
Posts: 18
Joined: Mon Jul 13, 2009 12:00 am

IDownSamplingFunction for decimal x values

Post by yvb » Thu Dec 03, 2009 1:45 pm

Hi,
I am using TeeChart pro V8.0.0.6 Version v Active x, underC++
I am trying to limit thenumber of points dispalyed by using IDownSamplingFunction with the dsMinMax method:

m_Chart.Series(1).SetFunction(tfDownSampleFun);
m_Chart.Series(1).GetFunctionType().GetAsDownSampling().SetDownSampleMethod(dsMinMax);
m_Chart.Series(1).GetFunctionType().GetAsDownSampling().SetTolerance(10);
m_Chart.Series(1).SetDataSource(COleVariant("Series0"));

The probelm is that my X axis has decimal values lower than 1. The SetTolerance() accepts only integers. I understand that SetTolerance() limts the number of points by a range defined on the X axis, so how do I do it for a range lower than 1?

Is there a way to reduce the number of points used by defining on how many points will the dsMinMax operate instead of a range?

I read the topic "problems with the downsample function". Will the DisplayedPointCount property help?
I didn't find Set or Get for this property in version v8.0.0.6 and not in v8.0.0.7 which I just downloaded.

Thanks

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: IDownSamplingFunction for decimal x values

Post by Narcís » Thu Dec 03, 2009 2:32 pm

Hi yvb,
I read the topic "problems with the downsample function". Will the DisplayedPointCount property help?
Yes, I think DisplayedPointCount would help here. You can find similar discussions and examples here:

http://www.teechart.net/support/viewtop ... nce#p27480
http://www.teechart.net/support/viewtop ... nce#p39483
I didn't find Set or Get for this property in version v8.0.0.6 and not in v8.0.0.7 which I just downloaded
It's available in Visual Basic 6 but not in Visual C++. This is a defect I have added to the bug list (TA05014583) to be fixed for next 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
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: IDownSamplingFunction for decimal x values

Post by Narcís » Thu Oct 14, 2010 9:54 am

Hi yvb,

As an update, we found that this already works fine using current TeeChart version so that you can do this now:

Code: Select all

    m_chart.AddSeries(4); 
    m_chart.Series(0).FillSampleValues(200); 
    m_chart.GetAspect().SetView3D(false); 
    m_chart.Series(0).GetAsPoint().GetPointer().SetVerticalSize(1); 
    m_chart.Series(0).GetAsPoint().GetPointer().SetHorizontalSize(1); 
    m_chart.Series(0).GetAsPoint().GetPointer().GetPen().SetVisible(false); 

    m_chart.AddSeries(0); 
    m_chart.Series(1).SetFunction(39); 
    m_chart.Series(1).GetFunctionType().GetAsDownSampling().SetTolerance(4); 
    m_chart.Series(1).GetFunctionType().GetAsDownSampling().SetDownSampleMethod(0); 
    m_chart.Series(1).SetDataSource(COleVariant("Series0")); 
    m_chart.Series(1).GetFunctionType().GetAsDownSampling().SetDisplayedPointCount(10);     
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply