Page 1 of 1

Set minimum major tick count on axis

Posted: Tue May 26, 2009 2:48 pm
by 14048359
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!

Posted: Wed May 27, 2009 11:29 am
by narcis
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.

Posted: Tue Jun 02, 2009 3:54 pm
by 14048359
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!

Posted: Wed Jun 03, 2009 7:56 am
by yeray
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.