Page 1 of 1

label format repeating

Posted: Wed Apr 19, 2006 1:42 pm
by 9523665
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

Posted: Wed Apr 19, 2006 1:55 pm
by narcis
Hi Ajith,

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

Code: Select all

    TChart1.Axis.Left.Increment = 0.1

Posted: Wed Apr 19, 2006 2:00 pm
by 9523665
hi,

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

B Regards
Ajith

Posted: Wed Apr 19, 2006 2:05 pm
by narcis
Hi Ajith,

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

Thanks in advance.

Posted: Wed Apr 19, 2006 2:13 pm
by 9523665
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

Posted: Mon Apr 24, 2006 9:49 am
by Pep
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