options for having TChart show lots of data lazarus / 55-TAChart ---------------------------------------------------------------------- mas steindorff · 2011-03-03 22:35 I have added a tchart to my software so I can look at some of my data sets. I've found (as one would expect) that my system slows down after adding more than 26,000 points.  What I think I need is more of a summery of points where I only plot 1 in N points after exceeding X number of total points. I would like to see general trend of the data visually so I could just average the data segments but I also need to see all of the spikes that may only last one or two data points. Does any one have any suggestions for a decimation algorithm? At this point, The only one I've come up with is to have 2 points/epoch [Min & Max] where the epoch is like 0.1% of the total number of points to show.  It would be great if I could summarize 6 channel with 720K points each = 30 minutes out of a 30 day data set within a few seconds. ---------------------------------------------------------------------- Ask · 2011-03-04 00:31 What kind of series you use? If it is line series, you can try to make use of fast drawing optimizations. See line demo for an example. On my (fast) computer, I get 0.9 sec per refresh for 4,1*10^6 points. You may also use Sorted property to substantially speed up zoomed-in drawing in this case. ---------------------------------------------------------------------- mas steindorff · 2011-03-04 01:02 Quote from: Ask on March 04, 2011, 01:31:19 amWhat kind of series you use? If it is line series, you can try to make use of fast drawing optimizations. See line demo for an example. I'm using a line series.  I've looked at the TAchart demos that came with 9.28.2 and could not find any referferance to a "fast" properties in the demo code.  I've also looked at the TChart properties the object inspector shows and can only see the .Doublebuffered field which I have set to true. Quote from: Ask on March 04, 2011, 01:31:19 amOn my (fast) computer, I get 0.9 sec per refresh for 4,1*10^6 points. You may also use Sorted property to substantially speed up zoomed-in drawing in this case. I could live with that speed.  I understand there is a newer update in the daliy repo.  I can not update my rev of lazarus due to ongoing projects but is there more details /demos for the tchart in there?  I see one of the demos uses TAChartUtils but I'm not sure what options it adds to the tchart or how to wire it up if I did use it. ---------------------------------------------------------------------- Ask · 2011-03-04 04:39 Quote from: mas steindorff on March 04, 2011, 02:02:53 amI could live with that speed.  I understand there is a newer update in the daliy repo.  I can not update my rev of lazarus due to ongoing projects but is there more details /demos for the tchart in there?  I see one of the demos uses TAChartUtils but I'm not sure what options it adds to the tchart or how to wire it up if I did use it. Line series optimization is in 0.9.30 version, as well as other improvements. See http://wiki.freepascal.org/Lazarus_0.9.30_release_notes#TAChart for the list of changes. Maybe you can use newer TAChart with old Lazarus, but I am not sure of that. ---------------------------------------------------------------------- mas steindorff · 2011-03-14 23:02 Quote from: Ask on March 04, 2011, 05:39:37 amLine series optimization is in 0.9.30 version, as well as other improvements. See http://wiki.freepascal.org/Lazarus_0.9.30_release_notes#TAChart for the list of changes. Maybe you can use newer TAChart with old Lazarus, but I am not sure of that. I was able to download the new components from the svn.  unfortunately I am unable to open the demo with my rev of Lazarus, I keep getting an error "LCLbase" missing.  Is LCLbase something in the tachart or another component?   I'm now looking for a "chart recorder" like option for my next task.  I only want to show the last 10 seconds of these large data sets. If my update rate was 1/sec, then I think I need to keep clearing the lineseries and re-add the last 9 seconds + new data in order to show the data correctly and to keep the memory usage under control. I tried using the .delete to remove the oldest data but this killed the auto scaler and the X axis remained at the last value.  perhaps someone has a better ideal? ---------------------------------------------------------------------- Ask · 2011-03-15 17:11 QuoteI was able to download the new components from the svn.Did you install it successfully? QuoteIs LCLbase something in the tachart or another component?It is the non-visual part of LCL. See http://lists.lazarus.freepascal.org/pipermail/lazarus/2011- January/059988.html I still think the simplest option for you is to just download and install the snapshot build. QuoteI tried using the .delete to remove the oldest data but this killed the auto scaler and the X axis remained at the last value. Please post an example code demonstrating you problem.