Panning graph programmatically

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Alain Bolduc
Newbie
Newbie
Posts: 30
Joined: Mon Feb 18, 2008 12:00 am

Panning graph programmatically

Post by Alain Bolduc » Fri Aug 29, 2008 7:19 pm

Hi,

Is there a way to scroll the whole graph programmatically (not scrolling only one axis)? I would like to have the same behavior than when we pan with the mouse, except that I would like to specify an x-offset and y-offset. (Chart.Scroll(3,3) would be a perfect situation)

I tried (for example) leftAxis.Scroll(offset, checklimits), but I need the other axis to follow the specified scroll...

I looked at the source code the DoMouseMove event from Chart.cs and I would like to have something that does exactly that. Is there some way to do this or I have to copy all of the code in the chart class?

thank you very much!

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

Post by Narcís » Mon Sep 01, 2008 8:11 am

Hi Qwerty,

You could use TeeChart's mouse events for that, using their e.X and e.Y arguments for the mouse position can using axes SetMinMax method. Before doing the first panning you should calculate each axis range to perform SetMinMax accordingly.
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