Double axis & horizontal "zoom"

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Cinin
Newbie
Newbie
Posts: 9
Joined: Thu Jul 21, 2005 4:00 am

Double axis & horizontal "zoom"

Post by Cinin » Thu Aug 18, 2005 7:50 am

Hi,

I'm using Teechart.NET v2 (but started with the v1 trial) for Gantt charting. I'm now trying to have two horizontal axis with different scales:

labels...............18-08......................................................19-08
the first one ------|-------------------------------------------------|-----------

labels...............00:00........................12:00......................00:00
the second one ---|-------------------------|-----------------------|-----------

and then having them two sinchronized with an horizontal only zoom (I mean: when I zoom the x axis are the only one affected without changing the y one).

Any suggestion? Thanks in advance

Regards

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 Aug 18, 2005 8:28 am

Hi Cinin,

You can set zoom only being horizontal or vertical for your chart. This can be done using the chart editor at Chart -> General tab or at run-time using:

Code: Select all

tChart1.Zoom.Direction = Steema.TeeChart.ZoomDirections.Horizontal;
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

Cinin
Newbie
Newbie
Posts: 9
Joined: Thu Jul 21, 2005 4:00 am

Post by Cinin » Thu Aug 18, 2005 9:36 am

Thanks Narcis,

I set the chart to display the bars starting at the top of it instead of centered. Now I have a trackbar with 3 possibile position and I do when it's changed:

Code: Select all

			if (YOU_WANT_TO_ZOOM_OUT) 
			{
				double tmp = tChart1.Axes.Left.MinXValue;
				Rectangle r = new Rectangle(210,97,78,90); 
				tChart1.Zoom.ZoomRect(r); 
				zoomBar.Tag = zoomBar.Value;				
				tChart1.Axes.Left.AdjustMaxMin();
			}
			else // YOU_WANT_TO_ZOOM_IN
			{
				tChart1.Zoom.ZoomPercent(1.0);
			}
but the the bars are centered again (and I imagine the code above isn't the best to do a zoom).

BTW: what about the double axis issue? I tried with custom axis and other thing but I'm unable to have different scale (and different labels) keeping them sinchronized.

Thanks again

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 Aug 18, 2005 11:26 am

Hi Cinin,

Could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
BTW: what about the double axis issue? I tried with custom axis and other thing but I'm unable to have different scale (and different labels) keeping them sinchronized.
I thought your problem was how to zoom horizontally only. Could you please specify which is your exact problem and post an example if possible as well?

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

Cinin
Newbie
Newbie
Posts: 9
Joined: Thu Jul 21, 2005 4:00 am

Post by Cinin » Thu Aug 18, 2005 12:50 pm

thank you again Narcis, I'll try to build a running example stripping away all the others things.

BTW: in a gantt chart how can I change the start, end and/or value of a task?

I click on a task, retreive some info in the clickSeries event but I'm unable to find where I can change the values of that task. I found the X & Y properties but i need to change both the start and the width of the task!

Thanks in advance

Cinin
Newbie
Newbie
Posts: 9
Joined: Thu Jul 21, 2005 4:00 am

Post by Cinin » Thu Aug 18, 2005 12:55 pm

I found the gantt drag tool, pheraps I can take something from it :-)

Post Reply