Custom number of ticks

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
franckgar
Advanced
Posts: 109
Joined: Thu Nov 04, 2004 5:00 am

Custom number of ticks

Post by franckgar » Wed Jul 27, 2005 12:46 pm

Hi,

How can I define the exact number of ticks on each axis ?
Example : 4 ticks on bottom axis, and 4 minor-ticks between each ticks.

Thanks
Franck
franckgar

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 Jul 27, 2005 12:55 pm

Hi Franck,

The number of ticks will be determined by the combination of axis Minimum and Maximum properties values and Increment property value. The number of minor ticks can be set using MinorTickCount property.

In the snippet below you'll have 5 ticks (at 0, 5, 10, 15 and 20 positions) and 2 minor ticks between each tick.

Code: Select all

  With Chart1.Axes.Bottom do
  begin
    SetMinMax(0,20);
    Increment:=5;
    MinorTickCount:=2;
  end;
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