General information
Category:
Forms & Form designer
I use MSGraph for simple updateable charts with code like below in the interactivechange event of a form. Similar code in the combo box init of the form to load the first symbol in the array when the form is first run. There is a similar example in the solutions folder (Solutions.app)
#DEFINE CRLF CHR(13)+CHR(10)
#DEFINE TAB CHR(9)
LOCAL lcData
SET DELETED ON
i=this.Value
SELECT date, value;
FROM values WHERE symbol=thisform.marray[i,1] ;
ORDER BY date INTO CURSOR wtemp
IF _TALLY <=0
MESSAGEBOX("There is not enough data to construct"+CHR(13)+ ;
"a graph for the specified interval.",64,"Data Error",5000)
ENDIF
IF _TALLY >=255
#DEFINE MAX_LOC "Graph supports a maximum of 255 items, MORE items COULD exist"
WAIT WINDOW MAX_LOC TIMEOUT 2
ENDIF
#DEFINE CAP_LOC "Closing Price(s)"
SELECT wtemp
lcData = " " + TAB + CAP_LOC + CRLF
SCAN
lcData = lcData + DTOC(date)
lcData = lcData + TAB
lcData = lcData + ALLTRIM(STR(value)) + CRLF
ENDSCAN
SELECT Graph
APPEND GENERAL msgraph DATA lcData
USE IN wtemp
>I need to display some data using chart graphics on a form.
>I am wondering what would be the best way to go about it ?
>
>I have worked with OLE automation with Excel in the past for creating
>chart but I was wondering if any of you may suggest a better (and maybe faster, since OLE automation can be slow) to display charts on a form?
>
>Anybody ever used MSGraph?
>
>All suggestions, ideas and even extra-terrestrial thinking are welcomed ;)
>
>Thanks in advance
>
>Pascal
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only