Change the position of Axes title

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
IQSoft
Newbie
Newbie
Posts: 20
Joined: Mon Jun 18, 2007 12:00 am
Location: Greece
Contact:

Change the position of Axes title

Post by IQSoft » Thu Oct 16, 2008 12:50 pm

I have a chart and want to move the left axes title to the top of the chart and not centered as it comes by default and the botom axes title to the left of the axes and not centered. I could not find an option to the settings of the tiles in axes like Alignment option in the titles of the Chart.
Is there a way to do it????
Where can i upload a picture of the chart to be more specific????
Regards
Alex

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Oct 16, 2008 1:21 pm

Hi Alex,

I'm afraid this is not possible for now. You'd better draw your own text on the chart's canvas like this:

Code: Select all

procedure TForm1.Chart1AfterDraw(Sender: TObject);
var leftStr, bottomStr: String;
begin
  leftStr:=Chart1.Axes.Left.Title.Caption;
  bottomStr:=Chart1.Axes.Bottom.Title.Caption;

  Chart1.Canvas.RotateLabel(Chart1.Axes.Left.Title.ShapeBounds.Left,
                            Chart1.Axes.Left.IEndPos,leftStr,90);

  Chart1.Canvas.TextOut(Chart1.Axes.Bottom.IStartPos,
                        Chart1.Axes.Bottom.Title.ShapeBounds.Top,bottomStr);

  Chart1.Axes.Left.Title.Visible:=false;
  Chart1.Axes.Bottom.Title.Visible:=false;

  Chart1.MarginBottom:=8;
  Chart1.MarginLeft:=5;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.Draw;
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
Image Image Image Image Image Image
Instructions - How to post in this forum

IQSoft
Newbie
Newbie
Posts: 20
Joined: Mon Jun 18, 2007 12:00 am
Location: Greece
Contact:

Post by IQSoft » Thu Oct 16, 2008 2:03 pm

Will it be available in a future version???? because the axes title is problem when you make a chart like cross and the 2 axes interect in 0,0 point. An option like alignment will be nice like chart title alignment

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Oct 16, 2008 2:09 pm

Hi Alex,

This already an item in the wish-list to be considered for inclusion in future releases.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply