International numbers

TeeChart for ActiveX, COM and ASP
Post Reply
Vivo
Newbie
Newbie
Posts: 36
Joined: Fri Nov 26, 2004 5:00 am
Contact:

International numbers

Post by Vivo » Tue Oct 07, 2008 4:13 pm

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

Vivo
Newbie
Newbie
Posts: 36
Joined: Fri Nov 26, 2004 5:00 am
Contact:

Post by Vivo » Thu Oct 09, 2008 6:17 pm

So I take it nobody knows anything about this? Very disappointing. :(

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

Post by Pep » Tue Oct 14, 2008 10:28 am

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 ?

Vivo
Newbie
Newbie
Posts: 36
Joined: Fri Nov 26, 2004 5:00 am
Contact:

Post by Vivo » Fri Oct 24, 2008 5:52 pm

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?

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

Post by Pep » Tue Oct 28, 2008 4:19 pm

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.

Vivo
Newbie
Newbie
Posts: 36
Joined: Fri Nov 26, 2004 5:00 am
Contact:

Post by Vivo » Fri Dec 12, 2008 4:19 pm

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?

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

Post by Narcís » Tue Dec 16, 2008 12:35 pm

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
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