1

Can anyone let me know how to use CSeriesStatsTool for getting the data such as mean, Median, Std. Dev.

Thanks Akshay

1 Answers1

1

Statistics tool makes easy to add basic functions to series, like Average, Trend, etc.And also shows a report with basic statistical information about the selected series. You can find a simple example in the TeeChartActiveX Demo project, concretely, All feature\Tools\SeriesStats or taking a look in next simple example of code:

  Private Sub Form_Load()
    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

I hope will help

Thanks,

Sandra Pazos
  • 843
  • 5
  • 10
  • I can't add a new series, Actually I want only the data which is present in the info tab of statistics tool, can you let me know how Can I retrieve this. – Akshay Bhalla Oct 03 '13 at 05:30
  • Hello Akshay Bhalla, If you want the info, to get it you only need do something as do, in next line of code Text1.Text = TChart1.Tools.Items(0).asSeriesStats.Statistics.Text,therefore, you only need access to the Statistics text of your series. – Sandra Pazos Oct 03 '13 at 14:22