Page 1 of 1

Error when setting series maximum if value is negative

Posted: Mon Apr 25, 2005 1:04 pm
by 9526543
We have been experiencing this error since version 5......keep hoping that it will be fixed in a new version or in maintenance.

The error occurs when trying to set a series maximum:

.Axis.Custom(jIndex).Maximum = nMax * 0.9

....where nMax = -5 for instance. jIndex seems to be irrelevant.
but is usually zero...if the series that has negative values is the
first set.

The error is:

error '8000ffff'
/lib_chart2_V7.asp, line 695 <-----the line above

Our workaround is to bypass the line if nMax is negative * 0.9 is negative, but that makes the maximum zero....which is not appropriate for charting very negative numbers.

Posted: Mon Apr 25, 2005 1:34 pm
by narcis
Hi scotth,

There's a problem we are aware of that DepthTopAxis is considered as a custom axis with index 0. This makes other custom axes indexs start at 1.

Maybe using:

Code: Select all

.Axis.Custom(jIndex+1).Maximum = nMax * 0.9 
Can be helpful for you. Could you please try this and let us know how it goes?

Posted: Thu Apr 28, 2005 8:41 am
by narcis
Hi scotth,

This has already been fixed for TeeChart Pro v7.0.04 ActiveX which has been releases this week and is available at our Customer Download Area.

Posted: Thu Apr 28, 2005 1:00 pm
by 9526543
Unfortunately, no.......it has not been fixed in the latest release. Steema sent us an early version of this release and the negative maximum still fails as described above.

Just to be certain, I installed as requested above....same result......same error message.

Posted: Thu Apr 28, 2005 3:39 pm
by narcis
Hi scotth,

This code works for me:

Code: Select all

    TChart1.Series(0).FillSampleValues 10
    
    TChart1.Axis.Custom(0).Title.Caption = "Axis 0"
    TChart1.Axis.Custom(0).Title.Angle = 90
It places the axis title to the correct custom axis.

Please download the latest installer from our website and try if it works for you.

Posted: Thu Apr 28, 2005 3:43 pm
by 9526543
Thanks for the reply...but I am not sure where we are going with this. That code works for me too.

The failure is when the series(0) maximum is attempted to be set with a negative value...then we get the error.

The first problem in this thread is fixed by the latest release. The negative maximum problem is not fixed.

By the way......setting the series minumum with a negative value works fine.

Posted: Thu Apr 28, 2005 3:50 pm
by narcis
Hi scotth,

Ah, ok! Sorry I didn't understood you were refering to that problem. This can be because you are trying to set a Maximum value which is lower than the Minimum. Maximum has to be greater than the Minimum. Is that your case?

Posted: Tue May 03, 2005 12:22 pm
by 9526543
Thank you. You are quite correct. In the case where the max is negative, setting it BEFORE setting the minimum, which defaults to zero, causes the error. We coded around that possibility now...works fine.