Page 1 of 1

International numbers

Posted: Tue Oct 07, 2008 4:13 pm
by 9525016
Is there some way of setting the axis to display numbers that use a different thousands separator and a different fraction separator?

I looked at ValueFormat, but there is very limited documentation on that, and what I have seen doesn't seem to show that it can be done.

I'm using TeeChart 7.03AX

Sanks

Posted: Thu Oct 09, 2008 6:17 pm
by 9525016
So I take it nobody knows anything about this? Very disappointing. :(

Posted: Tue Oct 14, 2008 10:28 am
by Pep
Hello,

yes, you should use the ValueFormat property to specify the desired format :
TChart1.Axis.Left.Labels.ValueFormat = "###x###x##"

What are you trying to accomplish ?

Posted: Fri Oct 24, 2008 5:52 pm
by 9525016
I'm trying to accomplish to have numbers show with a subset of characters to use as thousand separators and decimal point. Some languages use a . for thousand and a , for the decimal point. I really need this flexibility. Does it exist?

Posted: Tue Oct 28, 2008 4:19 pm
by Pep
Hello,

I'm not sure what kink of format you're trying to show.
By default Teechart gives the decimal and thousand format defined into the regional settings. As this depends on each machine, you have the ability to check the format used with the following code :

TChart1.Environment.DecimalSeparator

allowing to know the Valueformat you have to set in each case.

Posted: Fri Dec 12, 2008 4:19 pm
by 9525016
Pep wrote:Hello,

I'm not sure what kink of format you're trying to show.
By default Teechart gives the decimal and thousand format defined into the regional settings. As this depends on each machine, you have the ability to check the format used with the following code :

TChart1.Environment.DecimalSeparator

allowing to know the Valueformat you have to set in each case.
Yeah, well, I haven't tried to change regional settings to see if that works. But even if it did, I cannot change them due to a bug in some language which would make the CPU go crazy. :(

Is there a way of changing either of them manually?

Posted: Tue Dec 16, 2008 12:35 pm
by narcis
Hi Vivo,

Yes, you should do something like this:

Code: Select all

Private Sub Form_Load()
TChart1.Series(0).FillSampleValues (5)
TChart1.Axis.Bottom.Labels.ValueFormat = "###,##0.00"
End Sub

Private Sub TChart1_OnGetAxisLabel(ByVal Axis As Long, ByVal SeriesIndex As Long, ByVal ValueIndex As Long, LabelText As String)
If TChart1.Environment.DecimalSeparator = "," Then
    LabelText = Replace(LabelText, ",", ".")
End If
End Sub