Custom decimal symbol and digit grouping

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
tsiipola
Newbie
Newbie
Posts: 21
Joined: Tue Oct 02, 2007 12:00 am

Custom decimal symbol and digit grouping

Post by tsiipola » Tue Sep 14, 2010 11:15 am

Hello!

Currently it does not seem to be possible to set following things for axes labels:
- Custom decimal symbol instead of . or , etc.
- Custom digit grouping instead of the default 3
- Custom digit grouping symbol instead of . or , etc.

So it is not possible to have for example decimal symbol Z and digit grouping symbol X and digit grouping of let's say 5, in which case one million would be shown as following (presuming 2 digits after decimal symbol):
10X00000Z00

If so, then I would like to request this capability to TeeChart. This is possible in other parts of our software, so our customers are asking why the charts do not use the same formatting.

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Custom decimal symbol and digit grouping

Post by Yeray » Wed Sep 15, 2010 2:08 pm

Hi,

Please take a look at here to understand how the floats can be formatted in delphi.
In particular, I think that what you are trying to do can be done as follows:

Code: Select all

uses series;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=false;

  with Chart1.AddSeries(TPointSeries) do
  begin
    Add(500000);
    Add(1000000);
    Add(2000000);
  end;

  DecimalSeparator:='Z';
  Chart1.Axes.Left.AxisValuesFormat:='#X####0.00';
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply