How to implement a progress bar while chart is loading

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

How to implement a progress bar while chart is loading

Post by Mike Jones » Tue May 15, 2007 12:21 am

I have many points at time to plot on a chart. While TeeChart is processing these points I have an animated progress bar providing user feedback that application is not locked up but is still processing.

I have this animator working while we compute the point in an asssembly. The progress bar animation updates just fine. I want the animation to continue while we add the series to the TeeChart and it is working on displaying those series.

Unfortunately the timer that is updating the progress bar never gets a chance to call its "tick" event because TeeChart is using all the CPU cycles.

My timer's interval = 100
I am adding 2 point series's, and a line series totalling > 1,000,000.

Is there any sample code or techniques you can point me to implement a progress bar that will update using a timer while TeeChart loads large series' of data?

Thanks.

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

Post by Narcís » Tue May 15, 2007 9:04 am

Hi Mike,

I can't think of such example right now. Maybe you could start the timer or progress bar on BeforeDraw chart event and stop it in the AfterDraw event.

At this thread you'll find an example on how those events are used for calculating the time it takes to draw a chart.
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

Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

Request from users

Post by Mike Jones » Fri Jul 27, 2007 7:55 pm

I see that this thread has been viewed over 200 times. Obviously this is of some interest to the user community. I still haven't solved this issue. I believe it is worthy of some attention.

If anyone in the user community has succesfully loaded the TChart control with a large number of points in a separate thread to prevent the dialog it is sitting in from freezing up I would sure like to know how they did it.

I am currently using V3 of the TChart control in a Winforms form.

I see that there is a method called Invoke that can be used on UI components that support UI threading. I have not figured out how to use it. If anyone has any experience in this area I would love to chat with you.

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

Post by Narcís » Wed Aug 08, 2007 8:18 am

Hi Mike,

In that case, what we suggested here may be helpful for you.
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