AddArray problem

TeeChart for ActiveX, COM and ASP
Post Reply
Andras
Newbie
Newbie
Posts: 8
Joined: Mon Jul 08, 2002 4:00 am
Location: Hungary

AddArray problem

Post by Andras » Wed Oct 13, 2004 12:27 pm

Dear Support

I have newbie like question:

Uppon adding a simple array to the chart with the AddArray method, i get the following error message:

"Variant or safe array index out of bounds"

The following simple VB code wo'nt work:

Dim X_ARRAY(10) As Single
Dim Y_ARRAY(10) As Single
Dim I As Integer

Randomize
For I = 1 To 10

X_ARRAY(I) = CSng(I)
Y_ARRAY(I) = Rnd * 10#

Debug.Print I, Y_ARRAY(I)

Next I

' Now add it to the chart.

frmAddArray.TChart1.AddSeries scLine
frmAddArray.TChart1.Series(0).AddArray UBound(Y_ARRAY), Y_ARRAY(), X_ARRAY()
'

What can be the problem?

Tx in advance, regards

Andras

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Oct 13, 2004 3:12 pm

Hi Andras,

which TeeChart Pro version are you using ? I've just test it here using the v7.02 with VB6 and works fine.

Andras
Newbie
Newbie
Posts: 8
Joined: Mon Jul 08, 2002 4:00 am
Location: Hungary

Post by Andras » Wed Oct 13, 2004 3:54 pm

[quote="Pep"]Hi Andras,

which TeeChart Pro version are you using ? I've just test it here using the v7.02 with VB6 and works fine.[/quote


I've got V6.

Regards

Andras

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Oct 13, 2004 5:07 pm

Hi Andras,

it also works fine using the v6.05 downloadable from our web site (at the private customers download page).
If you still having problems I can post an example into the steema.public.atachments newsgroup so you can test it.

Post Reply