Chart in visible area

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
asupriya
Advanced
Posts: 179
Joined: Mon Dec 01, 2008 12:00 am

Chart in visible area

Post by asupriya » Tue Jan 06, 2009 2:46 pm

How can i know if a chart is in viewable area of screen? I have several charts arranged in vertical manner and i am thinking that updating the cursor only the viewable charts will greatly reduce the lag in cursor movements. (Steema.TeeChart.TChart).IsAccessible property always return false for every chart when put in a loop.

The snippet of code is as follows:
Code:

Code: Select all

If CType(Panel2.Controls.Item(i), Steema.TeeChart.TChart).IsAccessible Then
CType(DestChart.Tools.Item(0), Steema.TeeChart.Tools.CursorTool).XValue = myXValue
End If 

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 Jan 07, 2009 10:55 am

Hi asupriya,

Yes, you can check if each chart is in the screen viewable area doing something like this:

Code: Select all

        Dim rect As New Rectangle(TChart1.Left, TChart1.Top, TChart1.Width, TChart1.Height)
        rect.IntersectsWith(ScreenRect)
ScreenRect could either be the full screen rectangle or WinForm rectangle.

Hope this helps!
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