Page 1 of 1

axis.Labels.LabelWidth returning zero

Posted: Wed Dec 17, 2008 8:19 pm
by 13048148
TeeChart 3.5.3225.32185

int a = axis.Labels.LabelWidth(0.0);
int b = axis.Labels.LabelWidth(1.03);

a = 44
b = 0

It seems two decimal places of precision causes the LabelWidth method to return zero.

If you can't repro, let me know and I will try to build a sample app.

Posted: Thu Dec 18, 2008 9:35 am
by narcis
Hi LT411,

I'm not able to reproduce the problem here using the same TeeChart version as you and this code:

Code: Select all

		public Form1()
		{
			InitializeComponent();
			InitializeChart();
		}

		private void InitializeChart()
		{
			Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
			line1.FillSampleValues();

			tChart1.Draw();
			
			int a = tChart1.Axes.Left.Labels.LabelWidth(0.0);
			int b = tChart1.Axes.Left.Labels.LabelWidth(1.03); 

			tChart1.Header.Text = a.ToString() + " - " + b.ToString();
		}
Can you reproduce the problem using code above? If the problem persists please send us a simple example project we can run "as-is" to reproduce the problem here.

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.