Axis arrow tool disable zoom

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
mat
Newbie
Newbie
Posts: 2
Joined: Wed Dec 05, 2007 12:00 am
Location: France
Contact:

Axis arrow tool disable zoom

Post by mat » Tue Aug 26, 2008 9:23 am

Hi,

I have a problem with axis arrow tools:
When I enable this tool with .Active = true, i can't make a zoom with mouse on chart region, the zoom in code work but not with mouse selection.

How can I do that?

Thanks in advance.

Mat

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

Post by Narcís » Tue Aug 26, 2008 9:26 am

Hi Mat,

Code below works fine for me here using latest TeeChart for .NET v3 maintenance release.

Code: Select all

		public Form1()
		{
			InitializeComponent();
			InitializeChart();		
		}

		private void InitializeChart()
		{
			Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
			line1.FillSampleValues();

			Steema.TeeChart.Tools.AxisArrow arrow1 = new Steema.TeeChart.Tools.AxisArrow(tChart1.Axes.Bottom);
			arrow1.Active = true;
		}
Could you please let us know the exact version you are using and modify the code snippet so that we can reproduce the problem here?

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
Image Image Image Image Image Image
Instructions - How to post in this forum

mat
Newbie
Newbie
Posts: 2
Joined: Wed Dec 05, 2007 12:00 am
Location: France
Contact:

Axis arrow tool disable zoom

Post by mat » Tue Aug 26, 2008 9:55 am

Hi,

I find my error: I need to detect when the user move the axis to refresh a grid and to do that, i handle the click event to refresh grid.
But if I do that, the zoom doesn't work.

Is there a way to catch other event?

Thanks

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

Post by Narcís » Tue Aug 26, 2008 10:05 am

Hi Mat,

Yes, I can think of several idea:

1. Try using KeyShift for zooming:

http://www.teechart.net/support/viewtopic.php?t=662

2. Try checking the mouse button used for refreshing the grid in the mouse event, using a different mouse button than the one used for zooming.

3. Check if axis scale has changed in the AfterDraw event and if so refresh the grid. That way you won't need any mouse input for that and therefore functionality won't "collide".

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