Ok - on my chart, the labels for the left axis are right up against the ticks. I would like to put a space or two in between - without losing right justified on the labels.
How do I do that?
Thanks.
Put space between LeftAxisLabel and Ticks
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Put space between LeftAxisLabel and Ticks
Hello,
The only options I can think of are:
1. Increasing ticks length, for example:
2. Implementing the OnGetAxisLabel doing something like the code snippet below, where some white spaces are being added with an additional character preventing them to be trimmed.
The only options I can think of are:
1. Increasing ticks length, for example:
Code: Select all
Chart1.Axes.Left.TickLength:=10;
Code: Select all
procedure TForm1.Chart1GetAxisLabel(Sender: TChartAxis;
Series: TChartSeries; ValueIndex: Integer; var LabelText: String);
begin
if Sender = Chart1.Axes.Left then
LabelText:=LabelText+' ·';
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Put space between LeftAxisLabel and Ticks
For completeness purpose I post an improvement on my suggestion MVBobj sent by email:
MVBobj wrote:It would work much better if we rephrased:
to:Code: Select all
LabelText:=LabelText+' ·';
which simply places a non-visible null character at the end thereby preventing trimming.Code: Select all
LabelText:=LabelText+' '+Chr(0);
This works adequately.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |