internationalization

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Jeff S
Newbie
Newbie
Posts: 13
Joined: Thu Jul 03, 2003 4:00 am

internationalization

Post by Jeff S » Tue Mar 20, 2007 1:22 pm

Hello,

I need the numbers on both the X and Y axis displayed in the European format 0,12 as instead of 0.12

Can anyone tell me how I go about doing this?

regards,
Jeff

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 Mar 20, 2007 2:59 pm

Hello Jeff,

Have you tried using Delphi's DecimalSeparator variable?

Code: Select all

  DecimalSeparator:=',';
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

Jeff S
Newbie
Newbie
Posts: 13
Joined: Thu Jul 03, 2003 4:00 am

Post by Jeff S » Tue Mar 20, 2007 3:12 pm

Hi Narcís,

I'm using TChart in C++ Builder. Does this still apply?

Thanks,
Jeff.

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 Mar 20, 2007 3:19 pm

Hi Jeff,

Yes, try this:

Code: Select all

        DecimalSeparator = ',';
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

Jeff S
Newbie
Newbie
Posts: 13
Joined: Thu Jul 03, 2003 4:00 am

Post by Jeff S » Tue Mar 20, 2007 3:26 pm

Hi Narcís,

I tried DecimalSeparator = ',';
but still not working. Do you have any advice on where I should set this variable?

Thanks,
Jeff

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 Mar 20, 2007 3:36 pm

Hi Jeff,

You can use DecimalSeparator in OnFormCreate event, for example. Another option would be setting axes labels format as told in Tutorial 4 - Axis Control. You'll find the tutorials at TeeChart's program group.
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

Jeff S
Newbie
Newbie
Posts: 13
Joined: Thu Jul 03, 2003 4:00 am

Post by Jeff S » Tue Mar 20, 2007 5:10 pm

Hi Narcís,

Actually the DecimalSeperator works on the Left Axis but not with data on the BottomAxis. As far as I am aware properties for both axis are the same :-(

Actually, the Left axis gets formatted ok i.e. with commas ',' and to three decimal places but no transformation is happening on the bottom axis at all. Numbers coming out like 0.1295423 I would have though AxisValuesFormat property would have solved this.

Any further ideas?

Thanks,
Jeff

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

Post by Pep » Mon Mar 26, 2007 10:28 am

Hi Jeff,

having as "." as Decimal separator and "," as Digit grouping in the Control Panel, using the following code I'm able to see all the axes labels formatted with comma between numbers :

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
  DecimalSeparator:=',';

  with Chart1.Axes do
  begin
    Left.Increment := 0.001;
    Left.AxisValuesFormat:='#.00';
    Bottom.AxisValuesFormat:='#.0000';
    Bottom.LabelStyle:=talValue;
  end;

  Series1.AddXY(1.1234,10.1121,'ss',clteecolor);
end;

Post Reply