Page 1 of 1
Title on leftaxis overlaps labels using TBoxSeries
Posted: Sun Sep 19, 2004 6:33 pm
by 9232649
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
Posted: Mon Sep 20, 2004 5:50 am
by Marjan
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;
Posted: Mon Sep 20, 2004 11:09 am
by 9232649
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
Posted: Mon Sep 20, 2004 1:19 pm
by Marjan
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).