If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > 2D array in MSchart

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-29-04, 04:12
faamugol faamugol is offline
Registered User
 
Join Date: Mar 2004
Posts: 58
2D array in MSchart

Hello ,


I' m using a 2D array to populate a MSchart


Dim dataArray(), arrTMP
Dim length, el, strString

strString = "12:00;0.001;12:15;0.000;12:30;0.0002;12:45;0.0003 "

arrTMP = Split(strString, ";")
length = 1
' arrange all elements into 2-dimensional array


For el = 0 To UBound(arrTMP) Step 2
ReDim Preserve dataArray(2, lengte)
dataArray(1, lengte) = arrTMP(el)
dataArray(2, lengte) = arrTMP(el + 1)
lengte = lengte + 1 ' increase index counter
Next

MSChart1(1).ChartData = dataArray

but the problem is for a MSchart the array must be filled as follow:

For el = 0 To UBound(arrTMP) Step 2
ReDim Preserve dataArray(lengte,2)
dataArray(lengte,1) = arrTMP(el)
dataArray(lengte,2) = arrTMP(el + 1)
lengte = lengte + 1 ' increase index counter
Next

and here the problem is:

In VBScript you can ReDim any array including multi-dimentioned arrays - but only the last dimention can be increased


And me I need to increase the first dimention..

Can somebody help me to solve that..?

thank you in advance for your help
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On