mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 21:16:05 +02:00
TAChart: Update "fit" demo
git-svn-id: trunk@39338 -
This commit is contained in:
parent
1a8decb856
commit
9f8e0a726b
@ -8,7 +8,7 @@ object frmMain: TfrmMain
|
|||||||
ClientWidth = 800
|
ClientWidth = 800
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
LCLVersion = '0.9.31'
|
LCLVersion = '1.1'
|
||||||
object pnlParams: TPanel
|
object pnlParams: TPanel
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 487
|
Height = 487
|
||||||
@ -72,7 +72,6 @@ object frmMain: TfrmMain
|
|||||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
|
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
|
||||||
}
|
}
|
||||||
NumGlyphs = 0
|
|
||||||
OnClick = btnSaveClick
|
OnClick = btnSaveClick
|
||||||
end
|
end
|
||||||
object cbTestFunction: TComboBox
|
object cbTestFunction: TComboBox
|
||||||
@ -88,25 +87,25 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object lblTestFunction: TLabel
|
object lblTestFunction: TLabel
|
||||||
Left = 14
|
Left = 14
|
||||||
Height = 14
|
Height = 13
|
||||||
Top = 12
|
Top = 12
|
||||||
Width = 64
|
Width = 63
|
||||||
Caption = 'Test function'
|
Caption = 'Test function'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object lblOfRange: TLabel
|
object lblOfRange: TLabel
|
||||||
Left = 195
|
Left = 195
|
||||||
Height = 14
|
Height = 13
|
||||||
Top = 46
|
Top = 46
|
||||||
Width = 56
|
Width = 55
|
||||||
Caption = '% of range'
|
Caption = '% of range'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object lblNoiseY: TLabel
|
object lblNoiseY: TLabel
|
||||||
Left = 14
|
Left = 14
|
||||||
Height = 14
|
Height = 13
|
||||||
Top = 46
|
Top = 46
|
||||||
Width = 79
|
Width = 78
|
||||||
Caption = 'Noise amplitude '
|
Caption = 'Noise amplitude '
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
@ -236,9 +235,9 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object lblFitOrder: TLabel
|
object lblFitOrder: TLabel
|
||||||
Left = 14
|
Left = 14
|
||||||
Height = 14
|
Height = 13
|
||||||
Top = 50
|
Top = 50
|
||||||
Width = 102
|
Width = 101
|
||||||
Caption = 'Degree of polynomial'
|
Caption = 'Degree of polynomial'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
@ -263,9 +262,9 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object lblFitEquation: TLabel
|
object lblFitEquation: TLabel
|
||||||
Left = 14
|
Left = 14
|
||||||
Height = 14
|
Height = 13
|
||||||
Top = 19
|
Top = 19
|
||||||
Width = 58
|
Width = 57
|
||||||
Caption = 'Fit equation'
|
Caption = 'Fit equation'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
|
@ -71,7 +71,7 @@ implementation
|
|||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Math, TAChartAxis, TAChartUtils, TACustomSource;
|
Math, TAChartAxis, TAChartUtils, TACustomSource, TAFitUtils;
|
||||||
|
|
||||||
const
|
const
|
||||||
// Parameters used for data generation; should be reproduced by the fit.
|
// Parameters used for data generation; should be reproduced by the fit.
|
||||||
@ -256,9 +256,9 @@ end;
|
|||||||
|
|
||||||
procedure TfrmMain.FormCreate(Sender: TObject);
|
procedure TfrmMain.FormCreate(Sender: TObject);
|
||||||
var
|
var
|
||||||
eq: TFitSeries.IEquationText;
|
eq: IFitEquationText;
|
||||||
begin
|
begin
|
||||||
eq := TFitSeries.TEquationText.Create;
|
eq := TFitEquationText.Create;
|
||||||
with cbTestFunction do begin
|
with cbTestFunction do begin
|
||||||
Items.Add(eq.Equation(fePolynomial).Params(POLY_PARAMS));
|
Items.Add(eq.Equation(fePolynomial).Params(POLY_PARAMS));
|
||||||
Items.Add(eq.Equation(feLinear).Params(LIN_PARAMS));
|
Items.Add(eq.Equation(feLinear).Params(LIN_PARAMS));
|
||||||
|
Loading…
Reference in New Issue
Block a user