Axis Ticks with no Labels

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

Axis Ticks with no Labels

Post by johnnix » Tue Dec 22, 2009 2:03 pm

Hello,

Is it possible to have an Axes to display only tick marks an no labels? It looks like when I set labels visible to false the ticks go away!!! I am using TeeChart 8.06

Regards

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

Re: Axis Ticks with no Labels

Post by Narcís » Tue Dec 22, 2009 2:47 pm

Hi johnnix,

You could set labels to an empty string o a blank-spaced string in the OnGetAxisLabel event.
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

johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

Re: Axis Ticks with no Labels

Post by johnnix » Wed Dec 23, 2009 7:16 am

Hello Narcis,

Thank you very much for your reply. I need to hide labels on Top and Right axes so I use the following code on the OnGetAxisLabel:

Code: Select all

if (TChartAxis(sender).ParentChart.RightAxis = TChartAxis(sender)) or
   (TChartAxis(sender).ParentChart.TopAxis = TChartAxis(sender)) then
  labeltext := '';
Is this correct?

Regards

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

Re: Axis Ticks with no Labels

Post by Narcís » Wed Dec 23, 2009 8:06 am

Hi johnnix,

Yes, but there's no need to typecast Sender argument, for example:

Code: Select all

  if (Sender = Sender.ParentChart.Axes.Right) or
     (Sender = Sender.ParentChart.Axes.Top) then
    LabelText := '';
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