label format repeating

TeeChart for ActiveX, COM and ASP
Post Reply
Ajith Nair
Newbie
Newbie
Posts: 49
Joined: Wed Aug 18, 2004 4:00 am

label format repeating

Post by Ajith Nair » Wed Apr 19, 2006 1:42 pm

Hi,

in y-axis, label is showing repetedly if there is only one decimal point is assigned as format(#0.0). if I change to (#0.0#) then its not.

Eg. 7.1, 7.1, 71, 7.2, 7.2 and so on. I just want to show 7.1, 72, 7.3 ..... only.

Thanks in advance,
Ajith

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 Apr 19, 2006 1:55 pm

Hi Ajith,

To solve that you can set the axis increment like this:

Code: Select all

    TChart1.Axis.Left.Increment = 0.1
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

Ajith Nair
Newbie
Newbie
Posts: 49
Joined: Wed Aug 18, 2004 4:00 am

Post by Ajith Nair » Wed Apr 19, 2006 2:00 pm

hi,

But how can I count that I have more than one from the same label?

B Regards
Ajith

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 Apr 19, 2006 2:05 pm

Hi Ajith,

In that case what would you like to have? Can you please elaborate on that?

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

Ajith Nair
Newbie
Newbie
Posts: 49
Joined: Wed Aug 18, 2004 4:00 am

Post by Ajith Nair » Wed Apr 19, 2006 2:13 pm

Hi,

First I want to count the repetition of label. If I have more than one, I can change the format to "#0.0#". otherwise I can continue with "#0.0"

Thanks
Ajith

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Apr 24, 2006 9:49 am

Hi Ajith,

the best way to check this or to customize the axis labels is by using the OnGetAxisLabel event which will return the labeltext of each axis :

Private Sub TChart1_OnGetAxisLabel(ByVal Axis As Long, ByVal SeriesIndex As Long, ByVal ValueIndex As Long, LabelText As String)
If Axis = 0 Then
If LabelText = ....
...
end if
end Sub

Post Reply