We were using TeeChart6 activex control and shifted to TeeChart2013 just for the sake of getting TeeChart work on 64 bit systems.
Problem - We keep adding data for line graph every second. When it reaches more than 15000 X-axis elements we delete the first point and add new point at the end for sake of displaying latest data. It used to work fine in TChart6 but as soon as we shifted to TChart2013 and kept it for overnight test it started to display message "Quantity of data to delete must be less than Count" for infinite times.
Check the attached jpg file.
We have been using TChart6 for more than 5 years but we did not get such errors at all.
Please give us solution ASAP as customer is waiting for the fix.
Help - Quantity of data to delete must be less than Count
Help - Quantity of data to delete must be less than Count
- Attachments
-
- Displayed error message
- TChartError.jpg (20.69 KiB) Viewed 8499 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Help - Quantity of data to delete must be less than Count
This exception is thrown in the Delete method, which deletes Quantity number of points from Start index, when (Start+Quantity-1) < Count. This error message would indicate that you are trying to remove more points that those existing in the series. I have done some tests here and it works fine. Can you please check that this is not the case? If the problem persists please attach a simple example project we can run "as-is" to reproduce the problem here.Jagdish wrote: Problem - We keep adding data for line graph every second. When it reaches more than 15000 X-axis elements we delete the first point and add new point at the end for sake of displaying latest data. It used to work fine in TChart6 but as soon as we shifted to TChart2013 and kept it for overnight test it started to display message "Quantity of data to delete must be less than Count" for infinite times.
Check the attached jpg file.
Thanks in advance.
In that case you might be interested in the Pro Support service explained here.Jagdish wrote:Please give us solution ASAP as customer is waiting for the fix.
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: Help - Quantity of data to delete must be less than Count
I have handled the situation using below DeleteSeriesAt function, but then too i am getting the same error
where
int nSeries = series index
int Idx = start index
int iDeleteCount = delete count
ABS = is a local function which returns positive value
Am I doing something wrong here?
where
int nSeries = series index
int Idx = start index
int iDeleteCount = delete count
ABS = is a local function which returns positive value
Code: Select all
void CGLTChart::DeleteSeriesAt(int nSeries,int Idx, int iDeleteCount)
{
int iValCount = Series(nSeries).GetCount();
int iPointsToDelete = ABS(iValCount-Idx);
if ( iDeleteCount >= iPointsToDelete )
{
iDeleteCount = iPointsToDelete-1;
}
if ( iDeleteCount > 0 )
{
Series(nSeries).DeleteRange(Idx, iDeleteCount);
}
}
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Help - Quantity of data to delete must be less than Count
Hello,
This code looks fine to me. Can you please arrange a simple example project we can run "as-is" to reproduce the problem here?
Thanks in advance.
This code looks fine to me. Can you please arrange a simple example project we can run "as-is" to reproduce the problem here?
Thanks in advance.
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 |