Series statistics

TeeChart for ActiveX, COM and ASP
Post Reply
mpaulson
Newbie
Newbie
Posts: 41
Joined: Fri Nov 15, 2002 12:00 am

Series statistics

Post by mpaulson » Wed Apr 09, 2008 1:54 pm

Hi:

I'm trying to use the Series statistics feature. The code your example doesn't work (and can't work), since it doesn't add the statistics tool. I added the tool myself, but the method returns and empty string for the statistics. Do I have to point it as a particular series first? Or if not, then could you show me a complete example?

Also, I have a question that you might not want to discuss in the open forum. Can I have an email address for someone in support? I promise only to discuss this one "procedural" issue and not to abuse the email address for general purpose support questions.

Thanks,

Matt

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

Post by Narcís » Wed Apr 09, 2008 2:30 pm

Hi Matt,
I'm trying to use the Series statistics feature. The code your example doesn't work (and can't work), since it doesn't add the statistics tool. I added the tool myself, but the method returns and empty string for the statistics. Do I have to point it as a particular series first? Or if not, then could you show me a complete example?
The example in the features demo shipped with v8.0.0.3 installer works fine for me. Is that the version you are using?

You can find a runtime example in the code below. Notice that at runtime you have to manually create the functions. They are generated automatically at designtime.

Code: Select all

Private Sub Form_Load()
    TeeCommander1.Chart = TChart1
    
    With TChart1
        .AddSeries scLine
        
        .Series(0).FillSampleValues 100
        
        .Tools.Add tcSeriesStats
        .Tools.Items(0).asSeriesStats.Series = TChart1.Series(0)
        
        ' Add a series to be used for an Average Function
        .AddSeries scLine
        
        'Define the Function Type for the new Series
        .Series(1).SetFunction tfAverage
        .Series(1).DataSource = .Series(0)
        
        Text1.Text = .Tools.Items(0).asSeriesStats.Statistics.Text
    End With
    
End Sub
For more information on adding functions at runtime please read Tutorial 7 - Working with Functions. Tutorials can be found at TeeChart's program group.
Also, I have a question that you might not want to discuss in the open forum. Can I have an email address for someone in support? I promise only to discuss this one "procedural" issue and not to abuse the email address for general purpose support questions.
Ok, please send your inquiry to info at steema dot com. They'll forward it to the technical department.

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

mpaulson
Newbie
Newbie
Posts: 41
Joined: Fri Nov 15, 2002 12:00 am

Post by mpaulson » Wed Apr 09, 2008 2:49 pm

Hi:

Yes, thanks. Your code is different that what I'm tryint to do.

I discovered by trial and error that you need to set the series as:


.Tools.Items(StatToolIndex).asSeriesRegion.Series = LastSeriesStats

It's working now.

Thanks!

Post Reply