LazStats: Refine and update chm of XvsMultYUnit.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8023 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-05-10 18:00:40 +00:00
parent d06acd4590
commit 6740602d6c
4 changed files with 34 additions and 17 deletions

Binary file not shown.

View File

@ -31,6 +31,8 @@ inherited XvsMultYForm: TXvsMultYForm
inherited HelpBtn: TButton
Left = 36
Top = 459
HelpType = htKeyword
HelpKeyword = 'html/PlotXVersusMultipleYValues.htm'
end
inherited ButtonBevel: TBevel
Top = 443

View File

@ -47,6 +47,7 @@ type
procedure AdjustConstraints; override;
procedure Compute; override;
procedure UpdateBtnStates; override;
function Validate(out AMsg: String; out AControl: TWinControl): Boolean; override;
public
constructor Create(AOwner: TComponent); override;
@ -84,24 +85,7 @@ var
ColLabels: StrDyneVec = nil;
selected: IntDyneVec = nil;
begin
if XEdit.Text = '' then
begin
ErrorMsg('No X variable selected.');
exit;
end;
if YBox.Items.Count = 0 then
begin
ErrorMsg('No Y variables selected.');
exit;
end;
xCol := GetVariableIndex(OS3MainFrm.DataGrid, Trim(XEdit.Text));
if xCol = -1 then
begin
ErrorMsg('X variable not found.');
exit;
end;
nY := YBox.Items.Count;
NoSelected := nY + 1; // one more for the x column, needed by Correlations()
@ -220,6 +204,37 @@ begin
end;
function TXvsMultYForm.Validate(out AMsg: String; out AControl: TWinControl): Boolean;
var
xCol: Integer;
begin
Result := false;
if XEdit.Text = '' then
begin
AControl := XEdit;
AMsg := 'No X variable selected.';
exit;
end;
xCol := GetVariableIndex(OS3MainFrm.DataGrid, Trim(XEdit.Text));
if xCol = -1 then
begin
AControl := XEdit;
AMsg := 'X variable not found.';
exit;
end;
if YBox.Items.Count = 0 then
begin
AControl := VarList;
AMsg := 'No Y variables selected.';
exit;
end;
Result := true;
end;
procedure TXvsMultYForm.VarListDblClick(Sender: TObject);
var
index: integer;