Possible bug - FastLine with same Y-value

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Wicket
Newbie
Newbie
Posts: 20
Joined: Mon Jan 15, 2007 12:00 am

Possible bug - FastLine with same Y-value

Post by Wicket » Wed Apr 18, 2007 11:50 am

I'm drawing a FastLine (haven't tested if the same goes for Line) on a chart. The FastLine consists of a number of "points" with different X values (dates), but the same Y-value (a double value).

When the line is initially drawn, everything looks fine, but if I zoom or hold down the middle mousebutton to move around on the chart, the Y-axis is messing up. I guess you will be able to reproduce the scenario pretty easy, but if you don't I can provide you with my code and a picture.

By the way, I'm using TeeChart for .Net v 2.0.2586.24039

Regards Andreas

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

Post by Narcís » Mon Apr 23, 2007 11:16 am

Hi Andreas,

This is not a bug. However, this is a special case where left axis range is zero since the maximum and minimum values are zero. Thus when zooming and drawing the labels, as range is zero they are drawn as you say. One way to easily solve that is manually setting left axis minimum and maximum values:

Code: Select all

			Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
			for (int i = 0; i < 10; i++)
			{
				line1.Add(5);
			}

			//tChart1.Axes.Left.SetMinMax(4, 6);
			tChart1.Axes.Left.SetMinMax(line1.MinYValue() - 1, line1.MaxYValue() + 1);
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