Chart Redraw Control
Posted: Wed Dec 05, 2007 8:17 pm
I have a question about controling when the TeeChart control gets redrawn.
We have developed a data plotting package using TeeChart .NET.
Our application is a Windows MDI application. There is one TeeChart control placed on each MDIChild form.
Since our graphs tend to be pretty large (2 million+ points is not uncommon at all), we do NOT want the graph to constantly redraw itself when you resize or move the MDIChild windows and therefore resize and move the TeeChart control.
What we have done to prevent this is we make the TeeChart control invisible and give the user a way to tell the chart to refresh which causes the TeeChart control to execute its DrawToBitmap method and the resulting image is placed into a PictureBox. So what the user actually sees (and interacts with) on the MDIChild is a PictureBox control and NOT the TeeChart control.
This works well in that it allows us to control when redraws are done.
However, it does not allow us to interact directly with the graph itself and makes using some tools (like axis arrows that can be clicked to scroll just an individual axis) something that we cannot use.
Is there any way to tell the TeeChart control to only redraw and resize the graph when explicitly instructed to do so?
I have heard people mention "double-buffering" implemented in the newer versions of TeeChart .NET v3.2 but have not seen any descriptions about what that really gains us.
Can anyone give details about the double-buffering implementation and how to control it OR can someone let me know if there is a way that we can turn off this constant redraw of the graph?
Thanks for any help that you can give us on this issue.
Aaron
We have developed a data plotting package using TeeChart .NET.
Our application is a Windows MDI application. There is one TeeChart control placed on each MDIChild form.
Since our graphs tend to be pretty large (2 million+ points is not uncommon at all), we do NOT want the graph to constantly redraw itself when you resize or move the MDIChild windows and therefore resize and move the TeeChart control.
What we have done to prevent this is we make the TeeChart control invisible and give the user a way to tell the chart to refresh which causes the TeeChart control to execute its DrawToBitmap method and the resulting image is placed into a PictureBox. So what the user actually sees (and interacts with) on the MDIChild is a PictureBox control and NOT the TeeChart control.
This works well in that it allows us to control when redraws are done.
However, it does not allow us to interact directly with the graph itself and makes using some tools (like axis arrows that can be clicked to scroll just an individual axis) something that we cannot use.
Is there any way to tell the TeeChart control to only redraw and resize the graph when explicitly instructed to do so?
I have heard people mention "double-buffering" implemented in the newer versions of TeeChart .NET v3.2 but have not seen any descriptions about what that really gains us.
Can anyone give details about the double-buffering implementation and how to control it OR can someone let me know if there is a way that we can turn off this constant redraw of the graph?
Thanks for any help that you can give us on this issue.
Aaron