Axis title position

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
franckgar
Advanced
Posts: 109
Joined: Thu Nov 04, 2004 5:00 am

Axis title position

Post by franckgar » Tue Jan 15, 2008 9:38 am

Hi,

How can I know the axis title position (in pixel units) ?
I tried to read TChartAxis.ShapeBounds but it returns (0,0,0,0).

I also want to know if it is possible to move the axis title on the graph with the mouse ?

Thanks in advance
Franck

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

Post by Narcís » Tue Jan 15, 2008 10:17 am

Hi Franck,
How can I know the axis title position (in pixel units) ?
I tried to read TChartAxis.ShapeBounds but it returns (0,0,0,0).
Where are you retrieving this values? You should do that at a stage where the chart has been drawn (eg.: OnAfterDraw event) or call Chart1.Draw() before retrieving the values.
I also want to know if it is possible to move the axis title on the graph with the mouse ?
I'm afraid this is not possible at the moment. TSelectorTool doesn't support axes title dragging. I'll add your request to our 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

franckgar
Advanced
Posts: 109
Joined: Thu Nov 04, 2004 5:00 am

Post by franckgar » Tue Jan 15, 2008 10:41 am

It is simple to reproduce this pb. Put a button on a graph who is displaying a trace, and on the OnClick event of the button put this code :

Code: Select all

   ShowMessage(inttostr(Chart1.BottomAxis.Title.ShapeBounds.Left) + ' ' +
               inttostr(Chart1.BottomAxis.Title.ShapeBounds.Top) + ' ' +
               inttostr(Chart1.BottomAxis.Title.ShapeBounds.Bottom) + ' ' +
               inttostr(Chart1.BottomAxis.Title.ShapeBounds.Right));
The message will be: 0 0 0 0

Any ideas ?
Franck

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

Post by Narcís » Tue Jan 15, 2008 10:53 am

Hi Franck,

Thanks for the information. I've been able to reproduce the issue here using TeeChart Pro v7 VCL. However, it works fine using TeeChart Pro v8 VCL.
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