Synchronized Scrolling

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Michael
Newbie
Newbie
Posts: 15
Joined: Thu Mar 06, 2003 5:00 am

Synchronized Scrolling

Post by Michael » Wed Feb 20, 2008 4:16 pm

I want to be able to horizontally scroll several charts at once based upon the movement (pan) of any other chart.

I have several highlow charts being displayed in a winform. I want to limit the vertical movement to zero as all charts' vertical scale is set to allow some "white space". It does not matter if the user zooms a chart - the zoomed chart will still scroll as the others - they get what they ask for.

All charts are datetime in the x-axis.

I am assuming I want to have a common scrolling handler for all the charts but I am at a loss as to what to do next.

Thanks in advance for any help.

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

Post by Narcís » Thu Feb 21, 2008 9:25 am

Hi Michael,

You could use each chart Scroll event handler for synchronizing the other charts. For synchronizing them you just need to set their axes minimum and maximum values using SetMinMax method, for example:

Code: Select all

			tChart2.Axes.Left.SetMinMax(tChart1.Axes.Left.Minimum, tChart1.Axes.Left.Maximum);
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