home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 25: Programming / pc_actual_25.iso / Delphi / TeeChartPro / TeeChart5Delphi5Eval.exe / %MAINDIR% / Examples / Features / Function_RootMeanSq.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-09-10  |  1.1 KB  |  51 lines

  1. unit Function_RootMeanSq;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   Base, StdCtrls, TeEngine, StatChar, Series, ExtCtrls, TeeProcs, Chart;
  8.  
  9. type
  10.   TRootMeanSqForm = class(TBaseForm)
  11.     Series1: TLineSeries;
  12.     Series2: TLineSeries;
  13.     TeeFunction1: TRMSFunction;
  14.     Label1: TLabel;
  15.     Label2: TLabel;
  16.     CheckBox1: TCheckBox;
  17.     procedure FormCreate(Sender: TObject);
  18.     procedure CheckBox1Click(Sender: TObject);
  19.   private
  20.     { Private declarations }
  21.     Procedure DisplayCalc;
  22.   public
  23.     { Public declarations }
  24.   end;
  25.  
  26. implementation
  27.  
  28. {$R *.DFM}
  29.  
  30. procedure TRootMeanSqForm.FormCreate(Sender: TObject);
  31. begin
  32.   inherited;
  33.   Series1.FillSampleValues(20);
  34.   DisplayCalc;
  35. end;
  36.  
  37. procedure TRootMeanSqForm.CheckBox1Click(Sender: TObject);
  38. begin
  39.   TeeFunction1.Complete:=CheckBox1.Checked;
  40.   DisplayCalc;
  41. end;
  42.  
  43. Procedure TRootMeanSqForm.DisplayCalc;
  44. begin
  45.   Label2.Caption:=FormatFloat('#.##',Series2.YValues[0]);
  46. end;
  47.  
  48. initialization
  49.   RegisterClass(TRootMeanSqForm);
  50. end.
  51.