hi,
i try to run it i get error message
Variable "= VtChChartType2dLine" is not found
thanks.
>>For a few years, we have been using the old MSGraph control along with the APPEND GENERAL suggestion of feeding the values to the control.
>>
>>As this table tends to get big at times, I've been investigating eliminating that method of populating a graph in favor of just feeding the control (or object) properties instead. I gave the MSChart control a whirl and it does work ok, except for when there is a large series (e.g. 475 rates on an interest rate yield curve) that get fed to the chart from a table. In that example, the chart take a very long time to refresh itself.
>>
>>Can anyone recommend a graph control/object that wouldn't be too evil to figure out and would actually refresh itself rather quickly on a large series?
>>
>>Laterness,
>>Jon
>
>Jon,
>I just tried this with MSChart and it showed instantly :
>
>
>oForm=createobject('form1')
>oForm.Show
>Read events
>#INCLUDE "mschrt20.h"
>Define CLASS form1 AS form
> Top = 0
> Left = 0
> Height = 520
> Width = 790
> DoCreate = .T.
> Name = "Form1"
>
> Add OBJECT mschart AS olecontrol WITH ;
> Top = 10, ;
> Left = 5, ;
> Height = 500, ;
> Width = 780, ;
> Name = "MsChart", ;
> OleClass = 'MSChart20Lib.MsChart'
>
> Procedure Init
>Create Cursor crsChart (myCaption c,myValue i)
>For ix=1 to 1000
> Insert into crsChart values (Sys(2015),Int(Rand()*1000))
>endfor
> lcTemp = Sys(2015)+".tmp"
> Copy To (lcTemp) type delimited with "" with tab
> _cliptext = FileToStr(m.lcTemp)
> Erase (m.lcTemp)
> Thisform.mschart.Editpaste
> Thisform.mschart.ChartType = VtChChartType2dLine
> Endproc
>
>Procedure QueryUnload
> Clear events
>endproc
>Enddefine
>
Cetin