I have multi-threaded application that interacts with TeeChart. Because of how we need to process the data that is generated, I add an remove many series's from the chart control. Some are visible others are not, some show in the legend, others do not. There is also some sizing of the chart that occurs because of some other controls I put around the chart. It is a very dynamic situation.
While this processing is going on and the data being charted is changing, I would like to chart to be flashing and changing making it distracting to the user. There are a couple of processing threads. 1 is generating the data and loops about 4 - 5 times. Each time coming up with a new set of data to chart. The other thread is consuming that data and mapping it to TeeChart series's and calculating Axes increments and labels and things of that sort.
I would like each iteration to have the chart draw the data ( add series, set axes labels, size the chart etc) without the user seeing the chart jump, flash, jerk, and other distracting behaviors.
I have tried calling SuspendLayout / ResumeLayout at various places but this does not seem to help. I have tried to do this on the chart and on the dialog that is the parent of the chart. Neither case helps.
Any thoughts on how to minimize or eliminate the UI distractions? Ideally it would be nice to freeze the drawing area until all data is in place in the chart and then have it completely redraw the chart one time. I did verify that the Graphics3D.UseBuffer = true;
How to prevent UI flashing and other mass update distraction
-
- Advanced
- Posts: 192
- Joined: Thu Feb 01, 2007 12:00 am
- Contact:
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Mike,
You could try setting TChart's AutoRepaint to false, do all your modifications, set it back to true when you want the chart being updated and call TChart's refresh method too.
You could try setting TChart's AutoRepaint to false, do all your modifications, set it back to true when you want the chart being updated and call TChart's refresh method too.
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 |
-
- Advanced
- Posts: 192
- Joined: Thu Feb 01, 2007 12:00 am
- Contact:
seems to help
Setting the AutoRepaint = false seems to help but it does not completely solve my problem.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Mike,
Thanks for the information. In that case you may be interested in reading this thread about using TeeChart for .NET with multi-threaded applications.
If this doesn't help, can you please send us a very simple example project we can run "as-is" to reproduce the problem here so that we can have a look at the issue?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroupo or at our upload page.
Thanks in advance.
Thanks for the information. In that case you may be interested in reading this thread about using TeeChart for .NET with multi-threaded applications.
If this doesn't help, can you please send us a very simple example project we can run "as-is" to reproduce the problem here so that we can have a look at the issue?
You can either post your files at news://www.steema.net/steema.public.attachments newsgroupo 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 |