axis.Labels.LabelWidth returning zero

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
LT411
Newbie
Newbie
Posts: 17
Joined: Wed Jan 30, 2008 12:00 am

axis.Labels.LabelWidth returning zero

Post by LT411 » Wed Dec 17, 2008 8:19 pm

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.

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 Dec 18, 2008 9:35 am

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.
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