Just how is the Moving average function used ?
Is there an example ?
I have a chart type scLine
m_Chart1.AddSeries(scLine);
m_Chart1.Series(0) ??? what next ?
Can moving average functions be used with scLine type charts ?
I'm still interested to know how moving average function are used...
Thanks
Hans W
Moving Average functions
Here one example :
>Is there an example ?
>Can moving average functions be used with scLine type charts ?
Yes, see the above example ..
Josep Lluis Jorge
http://support.steema.com
>Is there an example ?
Code: Select all
m_chart.GetAspect().SetView3D(false);
m_chart.AddSeries(scLine);
m_chart.Series(0).FillSampleValues(20);
m_chart.AddSeries(scLine);
m_chart.Series(1).SetFunction(tfMovavg);
m_chart.Series(1).GetFunctionType().SetPeriod(3);
m_chart.Series(1).SetDataSource(COleVariant("Series0"));
Yes, see the above example ..
Josep Lluis Jorge
http://support.steema.com
Also, forget to tell you that you can find more info about the Function types and how to use them in the TeeChart Pro Tutorials ( 7- Working with Functions) .
Josep Lluis Jorge
http://support.steema.com
Josep Lluis Jorge
http://support.steema.com
allergic reaction
Josep,
Thanks... But that part of the Tutorial is in VB and you know I have a serious allergic reaction to VB
I'm slowly building my How to Survuve TeeChart for VC++ users...
I'll add this example to that page...
Hans W
Thanks... But that part of the Tutorial is in VB and you know I have a serious allergic reaction to VB
I'm slowly building my How to Survuve TeeChart for VC++ users...
I'll add this example to that page...
Hans W
How to use it ?
m_Chart1.Series(0).SetFunction(tfMovavg);
m_Chart1.Series(0).GetFunctionType().SetPeriod(4.0);
m_Chart1.Series(0).SetDataSource(COleVariant("YValues"));
OK that compiles.
How is it used ?
Once every second this is called to update the chart, but where/when is the
moving average implemented ?
m_Chart1.Series(0).AddArray( 4096, YValues, XValues); // update
Everything I've tried to date and no moving average !
The help files(tutorial) imply it all just happens ! But it does not...
m_Chart1.Series(0).GetFunctionType().SetPeriod(4.0);
m_Chart1.Series(0).SetDataSource(COleVariant("YValues"));
OK that compiles.
How is it used ?
Once every second this is called to update the chart, but where/when is the
moving average implemented ?
m_Chart1.Series(0).AddArray( 4096, YValues, XValues); // update
Everything I've tried to date and no moving average !
The help files(tutorial) imply it all just happens ! But it does not...