Hi,
We do implement scrolling of real-time FastLineSeries by adding points:
theChart.Series[0].Add(thePoints.Value, strPointsDate1 );
Any by deleting points after initial 60 points are added:
theChart.Series[0].Delete(0);
Each point is being added once per second and after 60 seconds the first point of the series is being removed.
Unfortunately after something between 60 and 120 secs we end up with points getting deleted faster than added.
Eventually we end up with just one point.
PS.
1. I've read the article: "Real-time charting in TeeChart VCL"
2. theChart.Series[0].Count=60, even though eventually we can only see one.
3. theChart.Series[0].DrawAllPoints = True
FastLineSeries Problem
-
- Newbie
- Posts: 4
- Joined: Mon Sep 17, 2007 12:00 am
- Location: Royal Leamington Spa
- Contact:
-
- Newbie
- Posts: 4
- Joined: Mon Sep 17, 2007 12:00 am
- Location: Royal Leamington Spa
- Contact:
Additional experiments
Also tried it with the following settings:
theChart.Series[0].AutoRepaint := False;
theChart.Series[0].XValues.Order := loNone;
but it doesn't seem to make any difference.
theChart.Series[0].AutoRepaint := False;
theChart.Series[0].XValues.Order := loNone;
but it doesn't seem to make any difference.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Neil,
Could you please send us a simple example project we can run "as-is" to reproduce the problem here? You could use a timer and random data for populating the series.
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Could you please send us a simple example project we can run "as-is" to reproduce the problem here? You could use a timer and random data for populating the series.
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
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 |
-
- Newbie
- Posts: 4
- Joined: Mon Sep 17, 2007 12:00 am
- Location: Royal Leamington Spa
- Contact:
The files were posted using Steema's upload page. I think we've found a solution to the problem. You can figure out a solution without the full source code, just by looking at the code above. Hhowever, it would be interesting to see if you come up with the same solution, or maybe there's a better one than we already have?
/ Maciej Zagozda
/ Maciej Zagozda
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Neil,
Thanks for the example project. I've found that changing this line:
for this one:
solves the problem here.
We will investigate if this is a bug or I'm missing something else.
Thanks for the example project. I've found that changing this line:
Code: Select all
theChart.Series[intA].Delete(0);
Code: Select all
theChart.Series[intA].Delete(0,1,true);
We will investigate if this is a bug or I'm missing something else.
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 |
-
- Newbie
- Posts: 4
- Joined: Mon Sep 17, 2007 12:00 am
- Location: Royal Leamington Spa
- Contact:
Another solution?
Thank you for your prompt reply and the solution.
There shouldn't be any difference between:
Delete(0) and Delete(Start,Quantity,RemoveGap),
as above.
Appreciate the solution, but my collegue here suggested that the problem might be solved by a adding the points in a different way, not by improving the way of how we delete points.
What about theChart.Series.AddXY, does it look like another way of solving the problem?
There shouldn't be any difference between:
Delete(0) and Delete(Start,Quantity,RemoveGap),
as above.
Appreciate the solution, but my collegue here suggested that the problem might be solved by a adding the points in a different way, not by improving the way of how we delete points.
What about theChart.Series.AddXY, does it look like another way of solving the problem?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Neil,
Thanks for your feedback.
Yes, you are right, both Delete methods should behave in the same way here.
We have been reviewing the issue and we think there's a bug with Delete(ValueIndex) method. I've added this defect (TV52012856) to the bug list to be fixed for next releases.
The way you populate series seems fine to us.
Thanks for your feedback.
Yes, you are right, both Delete methods should behave in the same way here.
We have been reviewing the issue and we think there's a bug with Delete(ValueIndex) method. I've added this defect (TV52012856) to the bug list to be fixed for next releases.
The way you populate series seems fine to us.
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 Neil,
I've been investigating this issue and found that it's not a bug. The problem here is that you are populating series without adding X values. Therefore, when removing first value in the series and swapping it with the second value it reaches a point where all x values in the series are the same. To solve this problem you need to populate series like this:
I'll send you the project you sent with the modifications I made to get this working.
I've been investigating this issue and found that it's not a bug. The problem here is that you are populating series without adding X values. Therefore, when removing first value in the series and swapping it with the second value it reaches a point where all x values in the series are the same. To solve this problem you need to populate series like this:
Code: Select all
theChart[0].AddXY(thePoints.DateTime, thePoints.Temperature, strPointsDate1 + TeeLineSeparator + strPointsDate2 );
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 |