Error when setting series maximum if value is negative

TeeChart for ActiveX, COM and ASP
Post Reply
scotth
Newbie
Newbie
Posts: 14
Joined: Mon Apr 04, 2005 4:00 am
Contact:

Error when setting series maximum if value is negative

Post by scotth » Mon Apr 25, 2005 1:04 pm

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.

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 25, 2005 1:34 pm

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

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 Apr 28, 2005 8:41 am

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

scotth
Newbie
Newbie
Posts: 14
Joined: Mon Apr 04, 2005 4:00 am
Contact:

Post by scotth » Thu Apr 28, 2005 1:00 pm

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.

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 Apr 28, 2005 3:39 pm

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

scotth
Newbie
Newbie
Posts: 14
Joined: Mon Apr 04, 2005 4:00 am
Contact:

Post by scotth » Thu Apr 28, 2005 3:43 pm

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.

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 Apr 28, 2005 3:50 pm

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

scotth
Newbie
Newbie
Posts: 14
Joined: Mon Apr 04, 2005 4:00 am
Contact:

Post by scotth » Tue May 03, 2005 12:22 pm

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.

Post Reply