Logarithmic scale with base 10 issue

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
PoLabs
Newbie
Newbie
Posts: 35
Joined: Fri Feb 05, 2010 12:00 am

Logarithmic scale with base 10 issue

Post by PoLabs » Tue Jul 13, 2010 11:47 am

Hi,

I am using logarithmic scale with base of 10 on bottom axis. I have data which index goes from 1 to 1000000 in (on bottom axis) and I would like to represent this as logarithmic scale. On first attached image (Image1) I don't set AxisValuesFormat and I get values for labels on bottom axis from 1 to 1000000 when I set AxisValuesFormat to 00e-0 I get 10^0 10^1 etc but regarding previous scale it is wrong. Take a look at second attached image (Image2). If you compare you will see that in first case scale goes from 1 to 1000000 in second case it goes from 10^-1 to 10^5 which is by factor 10 less. Where there is 1 it should be 10^0 etc...

Is something wrong with my approach or maybe I have wrong format 00e-0? Thanks for help.

Image1
Slika1.jpg
AxisValuesFormat not set. Bottom axis is logarithmic.
Slika1.jpg (129.63 KiB) Viewed 5601 times
Image2
slika2.jpg
AxisValuesFormat set to 00e-0. Bottom axis is logarithmic.
slika2.jpg (128.41 KiB) Viewed 5575 times
Br,
Po

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

Re: Logarithmic scale with base 10 issue

Post by Yeray » Tue Jul 13, 2010 12:33 pm

Hi Po,

This is a known problem already in the defect list to be fixed in future releases (TV52014469).

As a workaround, you can use OnGetAxisLabels and multiply the labels by 10:

Code: Select all

procedure TForm1.Chart1GetAxisLabel(Sender: TChartAxis;
  Series: TChartSeries; ValueIndex: Integer; var LabelText: String);
begin
  if Sender = Chart1.Axes.Bottom then
    LabelText := FormatFloat('00e-0', StrToFloat(LabelText) * 10);
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

PoLabs
Newbie
Newbie
Posts: 35
Joined: Fri Feb 05, 2010 12:00 am

Re: Logarithmic scale with base 10 issue

Post by PoLabs » Tue Jul 13, 2010 1:21 pm

Hi,

Thanks for answer and solution. ;)

Br

PoLabs
Newbie
Newbie
Posts: 35
Joined: Fri Feb 05, 2010 12:00 am

Re: Logarithmic scale with base 10 issue

Post by PoLabs » Mon Aug 08, 2011 12:38 pm

Hi,

I wonder if bug TV52014469 has been already fixed?

Thanks for answer.

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

Re: Logarithmic scale with base 10 issue

Post by Yeray » Mon Aug 08, 2011 3:55 pm

Hello,

I'm afraid not yet. I recommend you to be aware at this Support forums, to subsribe to our RSS news feed, or to follow us on Twitter or Facebook for new release announcements and what's implemented on them.
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