Title on leftaxis overlaps labels using TBoxSeries

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Johan Ingemansson
Newbie
Newbie
Posts: 59
Joined: Fri May 28, 2004 4:00 am
Location: Sweden

Title on leftaxis overlaps labels using TBoxSeries

Post by Johan Ingemansson » Sun Sep 19, 2004 6:33 pm

Hello,

When the leftaxis has decimals in it´s labels(i.e 0, 0.5, 1, 1.5 etc) the title on the leftaxis overlaps the decimal values. Does anyone know how to solve this problem?

Best Regards,

Johan Ingemansson

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Mon Sep 20, 2004 5:50 am

Hi, Johan.

One workaround for this problem is to manually allocate left axis title and labels size. This can be done by using the following code:

Code: Select all

With Chart1.Axes.Left do
begin
  LabelsSize := 25; // 25px for axis labels
  TitleSize := 12; // 12px for axis title
end;
Marjan Slatinek,
http://www.steema.com

Johan Ingemansson
Newbie
Newbie
Posts: 59
Joined: Fri May 28, 2004 4:00 am
Location: Sweden

Post by Johan Ingemansson » Mon Sep 20, 2004 11:09 am

Excellent! One "sub" question concering left axis title, if I want to split the title in two rows because it´s to long. How can I do this? If I use the same procedure as with "main" title, this doesn´t work.

Best Regards,

Johan

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Mon Sep 20, 2004 1:19 pm

Hi.

The following code might help:

Code: Select all

  Chart1.Axes.Left.Title.Caption := '1st line'+#13+'2nd line';
Of course, you'll have to increase the axis TitleSize to accomodate for multiple lines (see my first reply in this thread).
Marjan Slatinek,
http://www.steema.com

Post Reply