Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MSChart ActiveX control
Message
From
15/06/2000 13:45:05
 
 
To
15/06/2000 12:51:19
John Mcdonald
Computers and Communications Ltd.
Deer Lake, Guatemala
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00377638
Message ID:
00380862
Views:
30
>Hi Erik,
>
>You answered our plea for help on UT. Sorry to be so long getting back to you, work has been quite hectic lately. Now heres the problem: We were hoping to use the MSChart control to display some stats in one of our applications. After reading the scanty help files and trying what they said, we haven't been able to get it to work. It seems that we need to take the data from our query and place it in a 2d array, then specify the array as the data source for the chart. We've tried that and all we seem to get are OLE automation errors.
>

I believe you are getting errors here because the chart's ChartData property accepts a COM SafeArray, which VFP arrays are not. You might have better luck looping through your array and setting the values manually:

WITH THISFORM.MSChart
.ColumnCount = ALEN(MyArray, 2)
.RowCount = ALEN(MyArray, 1)
For nColumn = 1 To .RowCount
For nRow = 1 To .ColumnCount
.Column = nColumn
.Row = nRow
.Data = MyArray[nRow, nColumn]
ENDFOR
ENDFOR
ENDWITH
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform