Page 1 of 1

Logarithmic axis - labels disappearing?

Posted: Wed May 04, 2011 3:22 pm
by 10551566
Hi,

When I select Logarithmic in the editor for the left axis then the labels don't appear (on left axis), please refer to attached pictures of the same chart. The increment is 20 and except for Logarithmic all other options are the same (between the two pictures of the graph). How do I get the labels to appear without using draw all labels (as this would show too many labels).

Regards,
Vincenzo

Re: Logarithmic axis - labels disappearing?

Posted: Thu May 05, 2011 9:27 am
by yeray
Hello Vincenzo,

I see in your left axis that the values in your series are from about 100 to about 250. In a base 10 logarithmic scale, the values are ..., 0.01, 0.1, 1, 10, 100,... So with your values, only the 100 label should be drawn in that scale.
I'm trying this with the following code:

Code: Select all

uses Series;

var Series1: TFastLineSeries;

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

  Series1:=Chart1.AddSeries(TFastLineSeries) as TFastLineSeries;
  Series1.Add(100);
  Series1.Add(225);
  Series1.Add(150);
  Series1.Add(200);
end;

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
  Chart1.Axes.Left.Logarithmic:=CheckBox1.Checked;
end;
And I'm obtaining the expected result when the checkbox is active:
Image
And adding some extra values to have a bigger range the result is also the expected:

Code: Select all

  Series1.Add(0.5);
  Series1.Add(2000);
Image

On the other hand, if you want you can change the LogarithmicBase to set another logarithmic scale or you can use Custom labels as in the example at "All features\Welcome !\Axes\Labels\Custom Labels" in the features demo program included with the installation.

If you still have problems with it, please arrange a simple example project we can run as-is to reproduce the problem here.
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Re: Logarithmic axis - labels disappearing?

Posted: Thu May 05, 2011 10:25 am
by 10551566
Hi Alonso,

Thanks for the explanation, for now that should be ok for me to proceed.

Regards,
Vincenzo