mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-30 14:47:19 +01:00
TAChart: Less hints and warnings in fit demo.
git-svn-id: trunk@63606 -
This commit is contained in:
parent
3c431cf740
commit
d0123e2ed8
@ -112,7 +112,7 @@ implementation
|
|||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Math, typ, spe, StrUtils,
|
Math, typ, spe,
|
||||||
TAChartAxis, TATypes, TAChartUtils, TACustomSource, TAFitLib;
|
TAChartAxis, TATypes, TAChartUtils, TACustomSource, TAFitLib;
|
||||||
|
|
||||||
const
|
const
|
||||||
@ -314,6 +314,7 @@ end;
|
|||||||
procedure TfrmMain.FitSeriesFitEquationText(ASeries: TFitSeries;
|
procedure TfrmMain.FitSeriesFitEquationText(ASeries: TFitSeries;
|
||||||
AEquationText: IFitEquationText);
|
AEquationText: IFitEquationText);
|
||||||
begin
|
begin
|
||||||
|
Unused(ASeries);
|
||||||
AEquationText.NumFormat('%.5f');
|
AEquationText.NumFormat('%.5f');
|
||||||
if cbHTML.Checked then
|
if cbHTML.Checked then
|
||||||
AEquationText.TextFormat(tfHtml)
|
AEquationText.TextFormat(tfHtml)
|
||||||
@ -369,8 +370,9 @@ end;
|
|||||||
procedure TfrmMain.CreateData;
|
procedure TfrmMain.CreateData;
|
||||||
var
|
var
|
||||||
i, n: Integer;
|
i, n: Integer;
|
||||||
x, y, xmin, xmax, ymin, ymax: Double;
|
x, y, xmin, xmax: Double;
|
||||||
xarr, yarr: array of Double;
|
xarr: array of Double = nil;
|
||||||
|
yarr: array of Double = nil;
|
||||||
begin
|
begin
|
||||||
RandSeed := 875876; // Reproducible noise for testing.
|
RandSeed := 875876; // Reproducible noise for testing.
|
||||||
n := edPointsCount.Value;
|
n := edPointsCount.Value;
|
||||||
@ -405,8 +407,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// Add noise to the y values, and add data to line series.
|
// Add noise to the y values, and add data to line series.
|
||||||
ymin := MinValue(yarr);
|
|
||||||
ymax := MaxValue(yarr);
|
|
||||||
FitSeries.BeginUpdate;
|
FitSeries.BeginUpdate;
|
||||||
try
|
try
|
||||||
FitSeries.Clear;
|
FitSeries.Clear;
|
||||||
@ -478,7 +478,6 @@ const
|
|||||||
PARAM_NAME: array[0..1] of String = ('a', 'b');
|
PARAM_NAME: array[0..1] of String = ('a', 'b');
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
L: Integer;
|
|
||||||
decsep: Char;
|
decsep: Char;
|
||||||
paramName: String;
|
paramName: String;
|
||||||
confL, confH: Double;
|
confL, confH: Double;
|
||||||
@ -600,6 +599,7 @@ var
|
|||||||
w: Integer;
|
w: Integer;
|
||||||
lb: TListBox;
|
lb: TListBox;
|
||||||
begin
|
begin
|
||||||
|
Unused(State);
|
||||||
lb := Control as TListbox;
|
lb := Control as TListbox;
|
||||||
lb.Canvas.FillRect(ARect);
|
lb.Canvas.FillRect(ARect);
|
||||||
s := lb.Items[Index];
|
s := lb.Items[Index];
|
||||||
@ -650,10 +650,7 @@ var
|
|||||||
L, LC: TStrings;
|
L, LC: TStrings;
|
||||||
x, y, dy: Double;
|
x, y, dy: Double;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
p: Integer;
|
|
||||||
res: Integer;
|
res: Integer;
|
||||||
s: String;
|
|
||||||
delim: Char;
|
|
||||||
begin
|
begin
|
||||||
if not FileExists(AFileName) then begin
|
if not FileExists(AFileName) then begin
|
||||||
ShowMessage('File not found.');
|
ShowMessage('File not found.');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user