Page 1 of 1

automatically adjusting the left margin on resize

Posted: Thu Feb 08, 2007 11:13 pm
by 8575642
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

Posted: Fri Feb 09, 2007 8:35 am
by narcis
Hi Andrew,

You could use Chart1.Axes.Left.MaxLabelsWidth property and modify left margin accordingly.

Posted: Mon Feb 19, 2007 1:10 am
by 8575642
Thanks, that did the trick (although I had to add a 'fudge factor' in order to get it to show the entire values)