Functions appear not to be working

TeeChart for ActiveX, COM and ASP
Post Reply
jgawlik
Newbie
Newbie
Posts: 2
Joined: Mon Nov 13, 2006 12:00 am

Functions appear not to be working

Post by jgawlik » Fri Nov 30, 2007 4:32 pm

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.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Nov 30, 2007 4:59 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

jgawlik
Newbie
Newbie
Posts: 2
Joined: Mon Nov 13, 2006 12:00 am

That appears to work

Post by jgawlik » Fri Nov 30, 2007 6:01 pm

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.

Post Reply