Problem in a graphic with a single Y Value.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
tiyo
Newbie
Newbie
Posts: 4
Joined: Tue Apr 08, 2003 4:00 am

Problem in a graphic with a single Y Value.

Post by tiyo » Wed Mar 31, 2010 3:47 pm

Hi,

I'm having problem with the display of a graphic and it goes like this : the Bottom axis represents days and is numbered from 8 to 43. The Left axis represents quantities and its maximum and minimum values change depending on the values in the series. The user has the choice to manually configure the axes or to allow the graphic to automatically configure itself, using the Automatic property of the axes. The problem happens when I have a unique value for the entire Y serie : from start to finish, "150" is what I have. When the user manually sets the Left axis' minimum and maximum to 150, I have an expected straight line, like this :
tchart1.JPG
Expected result
tchart1.JPG (13.48 KiB) Viewed 3083 times
But when the user asks to have it automatically configured, what I have looks like this :
tchart.JPG
error
tchart.JPG (50.88 KiB) Viewed 3072 times
I found out that the MinimumValue of the Left axis is not set to a "precise" 150 when using the Automatic property, but rather to something like "149.99998371693" while the MaximumValue looks approximately like "150.00001325436536" or "150.000000000001".

And one last thing I just found out : the smoothing of the curve is enabled. When I disable it, I have a straight line.

Do you have any advice or anything for me? Cause at this point, beside disabling the smoothing, I can't think of anything better... I'm new with TeeChart and would certainly appreciate your feedback!

Thanks!

Vic

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

Re: Problem in a graphic with a single Y Value.

Post by Narcís » Thu Apr 01, 2010 1:21 pm

Hi Vic,

As you already found, I'm afraid disabling smoothing is the only solution I can think of. Smoothed property internally uses a smoothing function for making better looking curves. This means adding points to the series to smooth curves. This is not designed for straight lines.
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

tiyo
Newbie
Newbie
Posts: 4
Joined: Tue Apr 08, 2003 4:00 am

Re: Problem in a graphic with a single Y Value.

Post by tiyo » Thu Apr 01, 2010 1:40 pm

Hi Narcis,

Thank for the quick response!

I will disable the smoothing when we only have one value!

Thanks!

Vic

Post Reply