Page 1 of 1

Logarithmic scale with base 10 issue

Posted: Tue Jul 13, 2010 11:47 am
by 10055200
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 5607 times
Image2
slika2.jpg
AxisValuesFormat set to 00e-0. Bottom axis is logarithmic.
slika2.jpg (128.41 KiB) Viewed 5581 times
Br,
Po

Re: Logarithmic scale with base 10 issue

Posted: Tue Jul 13, 2010 12:33 pm
by yeray
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;

Re: Logarithmic scale with base 10 issue

Posted: Tue Jul 13, 2010 1:21 pm
by 10055200
Hi,

Thanks for answer and solution. ;)

Br

Re: Logarithmic scale with base 10 issue

Posted: Mon Aug 08, 2011 12:38 pm
by 10055200
Hi,

I wonder if bug TV52014469 has been already fixed?

Thanks for answer.

Re: Logarithmic scale with base 10 issue

Posted: Mon Aug 08, 2011 3:55 pm
by yeray
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.