Comma as decimal separator

TeeChart for ActiveX, COM and ASP
Post Reply
Thangaraj
Newbie
Newbie
Posts: 4
Joined: Mon Feb 09, 2004 5:00 am
Location: India

Comma as decimal separator

Post by Thangaraj » Fri May 21, 2004 10:48 am

Hi there,

I am using TeeChart Pro AX 6.0.0.4, in VC++ 6...

The problem is how do I speicfy Comma ',' as decimal separator and Dot '.' as thousand separator for a formatting Marks....

I tried ISeries.SetValueFormat() method, but it seems it does'nt understand comma as decimal separator....

Any help would be appreciated...

Thanks in Advance
-Thangaraj A.L.

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

Post by Pep » Fri May 21, 2004 2:11 pm

Hi Thangaraj,

In terms of displaying numbers in a TeeChart on a form the TChart.Enviroment.DecimalSeparator is not relevant - numbers are always defined in the "US" style, i.e. 2,333 > 2.333, and what is actually displayed in the TeeChart will depend on the locale defined in the Windows Regional Options, more specifically in what is set in the Decimal Separator and Digit Grouping Symbol under "Numbers". For example, I run a US version of Win2K with the local set as "Catalan" (which uses the Number format used by Spanish and German) and when I run the following VB code:

Code: Select all

Private Sub Form_Load()
With TChart1
    .AddSeries scBar
    .Axis.Bottom.Labels.Angle = 90
    For i = 37000 To 37028
        .Series(0).AddXY i, Rnd * 100, "", clTeeColor
    Next i
End With
End Sub
The numbers on the bottom axis appear as "37.012", "37.014" etc. Opening "Regional Settings" and changing the locale in "General", the default locale in "Input Locales" and the locale in the toolbar to English United Kingdom) and running the code above gives me "37,012", "37.014" etc.on the bottom axis without any need for further programming.

Thangaraj
Newbie
Newbie
Posts: 4
Joined: Mon Feb 09, 2004 5:00 am
Location: India

Post by Thangaraj » Sat May 22, 2004 8:06 am

Hi Jorge

I got it, Thanks .....

Regards
-Thangaraj A.L.

Post Reply