mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 02:39:15 +02:00
TAChart: Fix distance demo not displaying fit results any more.
git-svn-id: trunk@60985 -
This commit is contained in:
parent
78857f4559
commit
93c0be69fd
@ -227,20 +227,25 @@ begin
|
|||||||
UseMax := true;
|
UseMax := true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
case rgFitParamCount.ItemIndex of
|
|
||||||
0: AText := Format('Mean value: %f', [chFitFitSeries1.Param[0]]);
|
|
||||||
1: AText := Format('Slope: %f', [chFitFitSeries1.Param[1]]);
|
|
||||||
2:
|
|
||||||
with chFitFitSeries1 do
|
|
||||||
if Param[2] = 0 then
|
|
||||||
AText := ''
|
|
||||||
else
|
|
||||||
AText := Format('Peak at x=%f y=%f', [
|
|
||||||
-Param[1] / (2 * Param[2]),
|
|
||||||
Param[0] - Sqr(Param[1])/(4 * Param[2])
|
|
||||||
]);
|
|
||||||
end;
|
|
||||||
chFitFitSeries1.Active := true;
|
chFitFitSeries1.Active := true;
|
||||||
|
chFitFitSeries1.ExecFit;
|
||||||
|
if chFitFitSeries1.ErrorMsg <> '' then
|
||||||
|
AText := chFitFitSeries1.ErrorMsg
|
||||||
|
else
|
||||||
|
case rgFitParamCount.ItemIndex of
|
||||||
|
0: AText := Format('Mean value: %f', [chFitFitSeries1.Param[0]]);
|
||||||
|
1: AText := Format('Slope: %f', [chFitFitSeries1.Param[1]]);
|
||||||
|
2:
|
||||||
|
with chFitFitSeries1 do
|
||||||
|
if Param[2] = 0 then
|
||||||
|
AText := ''
|
||||||
|
else
|
||||||
|
AText := Format('Peak at x=%f y=%f', [
|
||||||
|
-Param[1] / (2 * Param[2]),
|
||||||
|
Param[0] - Sqr(Param[1])/(4 * Param[2])
|
||||||
|
]);
|
||||||
|
end;
|
||||||
|
|
||||||
lblFit.Visible := true;
|
lblFit.Visible := true;
|
||||||
lblFit.Caption := AText;
|
lblFit.Caption := AText;
|
||||||
|
Loading…
Reference in New Issue
Block a user