Set minimum major tick count on axis

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

Set minimum major tick count on axis

Post by Alain Bolduc » Tue May 26, 2009 2:48 pm

Hi, is it possible to set a minimum major tick count on an axis?

I am falling in a situation where I get the following graph:

http://picasaweb.google.com/lh/photo/rO ... directlink

As you can see, there is only one label on the bottom axis, which we believe is unacceptable.

Note that if I apply a zoom, I will get something that makes much more sense (sorry the image is a little truncated on the right side..) :

http://picasaweb.google.com/lh/photo/C2 ... directlink

Is there a way to set a minimum number of major ticks?

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 » Wed May 27, 2009 11:29 am

Hi marvin966,

The easiest way I can think of is setting axes Increment, for example:

Code: Select all

			tChart1.Axes.Bottom.Increment = 0.1;
By default it's set to zero, which mean it's automatic and tries to plot as many labels as can be fitted in the axis. Setting increment to any value TeeChart will try to draw labels in that increment provided they don't overlap otherwise it will use the minimum increment were labels don't overlap.
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

Alain Bolduc
Newbie
Newbie
Posts: 30
Joined: Mon Feb 18, 2008 12:00 am

Post by Alain Bolduc » Tue Jun 02, 2009 3:54 pm

hi Narcis,

I am afraid this solution does not work for me.

See what I get when I zoom to a certain factor:

http://picasaweb.google.ca/lh/photo/68l ... directlink

Notice that there is NO major ticks on the bottom axis, which is even worse than the initial situation.

What I would like to do is to set, for example, 3 as the minimum amount of major ticks, to avoid situations like this one. The graph should automatically adjust the increment.

Thanks!

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Wed Jun 03, 2009 7:56 am

Hi marvin966,

Probably this will be due to your chart's setup. So it will be helpful if you could send us a simple example project we can run "as-is" to reproduce the problem here.
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply