Page 1 of 1

Functions appear not to be working

Posted: Fri Nov 30, 2007 4:32 pm
by 9533047
I am attempting to create a trend function series based on data from an existing point series. I have followed the tutorial in the documentation on how to create the function in the property sheet but when I execute my application the trend line does not show.

I am using the OpenEdge 4GL code on the TeeChart Pro ActiveX v7.0.1.4 to add each new data point from a database table. This works perfectly. The function, however, doesn't appear to be working at all.

Any ideas or suggestions would be greatly appreciated.

Posted: Fri Nov 30, 2007 4:59 pm
by narcis
Hi jgawlik,

This works fine for me here using the code below. Could you please test if it works fine at your end?

Code: Select all

    With TChart1
      'Add 2 data Series
      .AddSeries scPoint
      
      ' Populate them with data (here random)
      .Series(0).FillSampleValues 10
      
      ' Add a series to be used for an Average Function
      .AddSeries scLine
      'Define the Function Type for the new Series
      .Series(1).SetFunction tfTrend
      'Define the Datasource for the new Function Series
      'Datasource accepts the Series titles of the other 2 Series
      .Series(1).DataSource = "Series0"
       '    *Note - When populating your input Series manually you will need to
       '    use the Checkdatasource method
       '    - See the section entitled 'Defining a Datasource'
      'Change the Period of the Function so that it groups averages
      'every 2 Points
      '.Series(1).FunctionType.Period = 2
    End With
Thanks in advance.

That appears to work

Posted: Fri Nov 30, 2007 6:01 pm
by 9533047
Well, adding the function via hand coding it appears to be what I needed to do. Adding the function with property sheet doesn't seem to work in the OpenEdge for some reason.

Also, I'm not sure how I missed the section describing the CheckDataSource method but I did.

Thanks for your help.