automatically adjusting the left margin on resize

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Andrew
Newbie
Newbie
Posts: 11
Joined: Thu Feb 06, 2003 5:00 am

automatically adjusting the left margin on resize

Post by Andrew » Thu Feb 08, 2007 11:13 pm

Hello,

I'm experiencing problems with the left axis values whenever I resize my teechart windows. If the values being plotted are reasonably large (in the thousands), the left axis values get chopped off when I resize the window.

My Chart->LeftMargin is currently set to 5, and the margin units are percentage. This is ok initially, but as the chart size is reduced, the margin simply isn't big enough to show the entire values. Is there a setting I can choose to always force the axis values to be visible, or some sort of calculation I can do to work out how much space the numbers are going to take up and then adjust the margin accordingly?

Andrew

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

Post by Narcís » Fri Feb 09, 2007 8:35 am

Hi Andrew,

You could use Chart1.Axes.Left.MaxLabelsWidth property and modify left margin accordingly.
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

Andrew
Newbie
Newbie
Posts: 11
Joined: Thu Feb 06, 2003 5:00 am

Post by Andrew » Mon Feb 19, 2007 1:10 am

Thanks, that did the trick (although I had to add a 'fudge factor' in order to get it to show the entire values)

Post Reply