Add(Serie: IEmSerie);
Add(Serie: Prognoz.Platform.Interop.Modeller.IEmSerie);
Serie. Added data series.
The Add method adds the specified data series to the summary statistics calculation set.
To add all the available series to the set, use the IEmStatisticsSettings.AddAllSeries method; to remove all the series from the set, use the IEmStatisticsSettings.RemoveAllSeries method.
To execute the example, add a link to the Modeller system assembly.
Sub Stat;
Var
ExprMod: IExpressModeller;
Sett: IEmStatisticsSettings;
Serie: IEmSerie;
Ar: Array[14] Of Double;
ReportSettings: IEmReportSettings;
Sections: IEmSections;
i: Integer;
Begin
ExprMod := New ExpressModeller.Create;
// Initial data series
Ar[0] := 56; Ar[1] := 45; Ar[2] := 23; Ar[3] := 45;
Ar[4] := 65; Ar[5] := 23; Ar[6] := 54; Ar[7] := 87;
Ar[8] := 67; Ar[9] := 98; Ar[10] := 89;
Serie := ExprMod.Series.Add(Ar, "X1", "Data series");
Sett := ExprMod.CreateStatisticsSettings;
Sett.Add(Serie);
// Setting report parameters
Sett.Format := "Stats;Graph";
ReportSettings := Sett.ReportSettings;
ReportSettings.Title := "Statistical characteristics calculation";
ReportSettings.Subtitle := "Report";
ReportSettings.SeriesNameFormat := EmReportSeriesNameFormat.OnlyDisplayName;
ReportSettings.Precision := 1;
// Performing calculation
ExprMod.EvaluateMethod("C:\Statistics.html", Sett, True);
// Displaying the report sections information
Sections := Sett.Sections;
Debug.WriteLine("Report sections:");
For i := 0 To Sections.Count - 1 Do
If Sections.IsEnabled(i) Then
Debug.WriteLine(" - name " + Sections.Name(i));
Debug.WriteLine(" - identifier: " + Sections.Id(i));
If Sections.IsTurnedOn(i) Then
Debug.WriteLine(" - included to the report");
Else
Debug.WriteLine(" - not displayed in the report");
End If;
Debug.WriteLine("");
End If;
End For;
End Sub Stat;
After executing the example summary statistics are calculated for the specified data series. Results are output to the C:\Statistics.html report file. The report structure is displayed in the console window.
Imports Prognoz.Platform.Interop.Modeller;
…
Public Shared Sub Main(Params: StartParams);
Var
ExprMod: IExpressModeller;
Sett: IEmStatisticsSettings;
Serie: IEmSerie;
Ar: Array[14] Of Double;
ReportSettings: IEmReportSettings;
Sections: IEmSections;
i: Integer;
Begin
ExprMod := New ExpressModeller.Create();
Ar[0] := 56; Ar[1] := 45; Ar[2] := 23; Ar[3] := 45;
Ar[4] := 65; Ar[5] := 23; Ar[6] := 54; Ar[7] := 87;
Ar[8] := 67; Ar[9] := 98; Ar[10] := 89;
Serie := ExprMod.Series.Add(Ar, "X1", "Data series");
Sett := ExprMod.CreateStatisticsSettings();
Sett.Add(Serie);
// Setting report parameters
Sett.Format := "Stats;Graph";
ReportSettings := Sett.ReportSettings;
ReportSettings.Title := "Statistical characteristics calculation";
ReportSettings.Subtitle := "Report";
ReportSettings.SeriesNameFormat := EmReportSeriesNameFormat.emrfOnlyDisplayName;
ReportSettings.Precision := 1;
// Performing calculation
ExprMod.EvaluateMethod("C:\Statistics.html", Sett, True);
// Displaying the report sections information
Sections := Sett.Sections;
System.Diagnostics.Debug.WriteLine("Report sections:");
For i := 0 To Sections.Count - 1 Do
If Sections.IsEnabled[i] Then
System.Diagnostics.Debug.WriteLine(" - name: " + Sections.Name[i]);
System.Diagnostics.Debug.WriteLine(" - identifier: " + Sections.Id[i]);
If Sections.IsTurnedOn[i] Then
System.Diagnostics.Debug.WriteLine(" - included to the report");
Else
System.Diagnostics.Debug.WriteLine(" - not displayed in the report");
End If;
System.Diagnostics.Debug.WriteLine("");
End If;
End For;
End Sub;
After executing the example summary statistics are calculated for the specified data series. Results are output to the C:\Statistics.html report file. The report structure is displayed in the console window.
See also: