Page 1 of 1

Problem in a graphic with a single Y Value.

Posted: Wed Mar 31, 2010 3:47 pm
by 8119890
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 3086 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 3075 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

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

Posted: Thu Apr 01, 2010 1:21 pm
by narcis
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.

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

Posted: Thu Apr 01, 2010 1:40 pm
by 8119890
Hi Narcis,

Thank for the quick response!

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

Thanks!

Vic