diff --git a/applications/lazstats/LazStats.chm b/applications/lazstats/LazStats.chm
index 39d96db37..13e30a64e 100644
Binary files a/applications/lazstats/LazStats.chm and b/applications/lazstats/LazStats.chm differ
diff --git a/applications/lazstats/docs/HelpNDoc/LazStats.hnd b/applications/lazstats/docs/HelpNDoc/LazStats.hnd
index 7b7c2f9fa..6c7f5a642 100644
Binary files a/applications/lazstats/docs/HelpNDoc/LazStats.hnd and b/applications/lazstats/docs/HelpNDoc/LazStats.hnd differ
diff --git a/applications/lazstats/source/LazStats.lpi b/applications/lazstats/source/LazStats.lpi
index 4361df52f..a28f1c3d9 100644
--- a/applications/lazstats/source/LazStats.lpi
+++ b/applications/lazstats/source/LazStats.lpi
@@ -1396,6 +1396,7 @@
+
diff --git a/applications/lazstats/source/forms/analysis/descriptive/plotxyunit.pas b/applications/lazstats/source/forms/analysis/descriptive/plotxyunit.pas
index 2a226fbbc..784d6d1d6 100644
--- a/applications/lazstats/source/forms/analysis/descriptive/plotxyunit.pas
+++ b/applications/lazstats/source/forms/analysis/descriptive/plotxyunit.pas
@@ -357,10 +357,8 @@ begin
ChartForm.Clear;
// Titles
- ChartForm.SetTitle(Format('X vs. Y plot using file "%s"', [
- OS3MainFrm.FileNameEdit.Text
- ]));
- ChartForm.SetFooter(Format('R(X,Y) = %.3f, Slope = %.2f, Intercept = %.2f', [
+ ChartForm.SetTitle('X vs. Y plot using file ' + OS3MainFrm.FileNameEdit.Text);
+ ChartForm.SetFooter(Format('R(X,Y) = %.3f, Slope = %.3f, Intercept = %.3f', [
R, Slope, Intercept
]));
ChartForm.SetXTitle(XEdit.Text);
diff --git a/applications/lazstats/source/forms/misc/chartunit.lfm b/applications/lazstats/source/forms/misc/chartunit.lfm
index 829f20d07..5aa01c91f 100644
--- a/applications/lazstats/source/forms/misc/chartunit.lfm
+++ b/applications/lazstats/source/forms/misc/chartunit.lfm
@@ -1,40 +1,41 @@
object ChartForm: TChartForm
- Left = 299
- Height = 518
- Top = 133
- Width = 860
+ Left = 475
+ Height = 500
+ Top = 183
+ Width = 700
ActiveControl = CloseBtn
Caption = 'Plot window'
- ClientHeight = 518
- ClientWidth = 860
+ ClientHeight = 500
+ ClientWidth = 700
+ OnActivate = FormActivate
OnCreate = FormCreate
LCLVersion = '2.1.0.0'
object ButtonBevel: TBevel
Left = 0
- Height = 8
- Top = 468
- Width = 860
+ Height = 2
+ Top = 456
+ Width = 700
Align = alBottom
Shape = bsBottomLine
end
object ButtonPanel: TPanel
Left = 8
Height = 26
- Top = 484
- Width = 844
+ Top = 466
+ Width = 684
Align = alBottom
AutoSize = True
BorderSpacing.Around = 8
BevelOuter = bvNone
ClientHeight = 26
- ClientWidth = 844
- TabOrder = 1
+ ClientWidth = 684
+ TabOrder = 0
object PrintBtn: TButton
AnchorSideLeft.Control = ButtonPanel
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = ButtonPanel
AnchorSideTop.Side = asrCenter
- Left = 397
+ Left = 317
Height = 25
Top = 1
Width = 51
@@ -49,7 +50,7 @@ object ChartForm: TChartForm
AnchorSideTop.Control = ButtonPanel
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = PrintBtn
- Left = 299
+ Left = 219
Height = 25
Top = 1
Width = 86
@@ -65,7 +66,7 @@ object ChartForm: TChartForm
AnchorSideTop.Control = ButtonPanel
AnchorSideTop.Side = asrCenter
AnchorSideRight.Side = asrBottom
- Left = 460
+ Left = 380
Height = 25
Top = 1
Width = 55
@@ -77,47 +78,66 @@ object ChartForm: TChartForm
TabOrder = 2
end
end
- object Chart: TChart
+ object Panel1: TPanel
Left = 6
- Height = 456
+ Height = 444
Top = 6
- Width = 848
- AxisList = <
- item
- Grid.Color = clSilver
- Grid.Style = psSolid
- Grid.Visible = False
- Marks.LabelBrush.Style = bsClear
- Minors = <>
- Title.LabelFont.Orientation = 900
- Title.LabelFont.Style = [fsBold]
- Title.LabelBrush.Style = bsClear
- end
- item
- Grid.Color = clSilver
- Grid.Style = psSolid
- Grid.Visible = False
- Alignment = calBottom
- Marks.LabelBrush.Style = bsClear
- Minors = <>
- Title.LabelFont.Style = [fsBold]
- Title.LabelBrush.Style = bsClear
- end>
- BackColor = clWhite
- Foot.Brush.Color = clBtnFace
- Foot.Font.Color = clBlue
- Margins.Left = 8
- Margins.Top = 8
- Margins.Right = 8
- Margins.Bottom = 8
- Title.Brush.Color = clBtnFace
- Title.Font.Color = clBlue
- Title.Font.Style = [fsBold]
- Title.Text.Strings = (
- 'TAChart'
- )
+ Width = 688
Align = alClient
BorderSpacing.Around = 6
+ BevelOuter = bvNone
+ BorderStyle = bsSingle
+ Caption = 'Panel1'
+ ClientHeight = 440
+ ClientWidth = 684
+ Color = clWhite
+ ParentColor = False
+ TabOrder = 1
+ object Chart: TChart
+ Left = 6
+ Height = 428
+ Top = 6
+ Width = 672
+ AxisList = <
+ item
+ Grid.Color = clSilver
+ Grid.Style = psSolid
+ Grid.Visible = False
+ Marks.LabelBrush.Style = bsClear
+ Minors = <>
+ Title.LabelFont.Orientation = 900
+ Title.LabelFont.Style = [fsBold]
+ Title.LabelBrush.Style = bsClear
+ end
+ item
+ Grid.Color = clSilver
+ Grid.Style = psSolid
+ Grid.Visible = False
+ Alignment = calBottom
+ Marks.LabelBrush.Style = bsClear
+ Minors = <>
+ Title.LabelFont.Style = [fsBold]
+ Title.LabelBrush.Style = bsClear
+ end>
+ BackColor = clWhite
+ Foot.Brush.Color = clBtnFace
+ Foot.Brush.Style = bsClear
+ Foot.Font.Color = clBlue
+ Margins.Left = 8
+ Margins.Top = 8
+ Margins.Right = 8
+ Margins.Bottom = 8
+ Title.Brush.Color = clBtnFace
+ Title.Brush.Style = bsClear
+ Title.Font.Color = clBlue
+ Title.Font.Style = [fsBold]
+ Title.Text.Strings = (
+ 'TAChart'
+ )
+ Align = alClient
+ BorderSpacing.Around = 6
+ Color = clWhite
+ end
end
object SavePictureDialog: TSavePictureDialog
Filter = 'Graphic (*.png;*.bmp;*.jpeg;*.jpg;*.jpe;*.jfif;*.svg)|*.png;*.bmp;*.jpeg;*.jpg;*.jpe;*.jfif;*.svg|Portable Network Graphic (*.png)|*.png|Bitmaps (*.bmp)|*.bmp|Joint Picture Expert Group (*.jpeg;*.jpg;*.jpe;*.jfif)|*.jpeg;*.jpg;*.jpe;*.jfif|Scaleable Vector Graphic (*.svg)|*.svg|All Files (*.*)|*.*'
diff --git a/applications/lazstats/source/forms/misc/chartunit.pas b/applications/lazstats/source/forms/misc/chartunit.pas
index 9edaaf965..c013a4078 100644
--- a/applications/lazstats/source/forms/misc/chartunit.pas
+++ b/applications/lazstats/source/forms/misc/chartunit.pas
@@ -21,10 +21,12 @@ type
Chart: TChart;
CloseBtn: TButton;
ButtonPanel: TPanel;
+ Panel1: TPanel;
PrintBtn: TButton;
PrintDialog: TPrintDialog;
SaveBtn: TButton;
SavePictureDialog: TSavePictureDialog;
+ procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure PrintBtnClick(Sender: TObject);
procedure SaveBtnClick(Sender: TObject);
@@ -58,7 +60,7 @@ implementation
{$R *.lfm}
uses
- Math, Printers, //OSPrinters,
+ Math, Printers, OSPrinters,
TAChartUtils, TATypes, TADrawerSVG, TAPrint;
{ TChartForm }
@@ -72,6 +74,16 @@ begin
Chart.LeftAxis.Title.Caption := '';
end;
+procedure TChartForm.FormActivate(Sender: TObject);
+var
+ w: Integer;
+begin
+ w := MaxValue([SaveBtn.Width, PrintBtn.Width, CloseBtn.Width]);
+ SaveBtn.Constraints.MinWidth := w;
+ PrintBtn.Constraints.MinWidth := w;
+ CloseBtn.Constraints.MinWidth := w;
+end;
+
procedure TChartForm.FormCreate(Sender: TObject);
begin
Clear;
diff --git a/applications/lazstats/source/units/dataprocs.pas b/applications/lazstats/source/units/dataprocs.pas
index 74a28306c..be7a83cf9 100644
--- a/applications/lazstats/source/units/dataprocs.pas
+++ b/applications/lazstats/source/units/dataprocs.pas
@@ -278,11 +278,18 @@ end;
procedure OpenOS2File;
begin
- OS3MainFrm.OpenDialog1.DefaultExt := '.laz';
- OS3MainFrm.OpenDialog1.Filter := 'LazStats files (*.laz)|*.laz;*.LAZ|All files (*.*)|*.*';
- OS3MainFrm.OpenDialog1.FilterIndex := 1;
- if OS3MainFrm.OpenDialog1.Execute then
- OpenOS2File(OS3MainFrm.OpenDialog1.FileName, true);
+ with OS3MainFrm.OpenDialog1 do
+ begin
+ DefaultExt := '.laz';
+ Filter := 'LazStats files (*.laz)|*.laz;*.LAZ|All files (*.*)|*.*';
+ if InitialDir = '' then
+ InitialDir := Globals.Options.DefaultDataPath;
+ FilterIndex := 1;
+ if Execute then begin
+ OpenOS2File(FileName, true);
+ InitialDir := ExtractFilePath(FileName);
+ end;
+ end;
end;
procedure OpenOS2File(const AFileName: String; ShowDictionaryForm: Boolean);