2020-10-01 14:05:43 +00:00
|
|
|
{ Template for LazStats forms containing the ParamsPanel and a ChartFrame }
|
|
|
|
|
|
|
|
unit BasicStatsChartFormUnit;
|
|
|
|
|
|
|
|
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
|
|
Classes, SysUtils, Forms, Controls, Graphics, Dialogs,
|
|
|
|
ChartFrameUnit, BasicStatsParamsFormUnit;
|
|
|
|
|
|
|
|
type
|
|
|
|
|
|
|
|
{ TBasicStatsChartForm }
|
|
|
|
|
|
|
|
TBasicStatsChartForm = class(TBasicStatsParamsForm)
|
|
|
|
private
|
|
|
|
|
|
|
|
protected
|
|
|
|
FChartFrame: TChartFrame;
|
2020-10-01 15:08:49 +00:00
|
|
|
procedure UpdateBtnStates; override;
|
2020-10-01 14:05:43 +00:00
|
|
|
|
|
|
|
public
|
|
|
|
constructor Create(AOwner: TComponent); override;
|
2020-10-01 15:08:49 +00:00
|
|
|
procedure Reset; override;
|
2020-10-01 14:05:43 +00:00
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
var
|
|
|
|
BasicStatsChartForm: TBasicStatsChartForm;
|
|
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
{$R *.lfm}
|
|
|
|
|
|
|
|
uses
|
|
|
|
Utils;
|
|
|
|
|
|
|
|
{ TBasicStatsChartForm }
|
|
|
|
|
|
|
|
constructor TBasicStatsChartForm.Create(AOwner: TComponent);
|
|
|
|
begin
|
|
|
|
inherited;
|
|
|
|
|
|
|
|
FChartFrame := TChartFrame.Create(self);
|
|
|
|
FChartFrame.Parent := Self;
|
|
|
|
FChartFrame.Align := alClient;
|
|
|
|
FChartFrame.Chart.BottomAxis.Intervals.MaxLength := 80;
|
|
|
|
FChartFrame.Chart.BottomAxis.Intervals.MinLength := 30;
|
|
|
|
FChartFrame.BorderSpacing.Left := 4;
|
|
|
|
FChartFrame.BorderSpacing.Top := 8;
|
|
|
|
FChartFrame.BorderSpacing.Bottom := 8;
|
|
|
|
FChartFrame.BorderSpacing.Right := 8;
|
|
|
|
|
|
|
|
InitToolbar(FChartFrame.ChartToolbar, tpRight);
|
|
|
|
|
|
|
|
Reset;
|
|
|
|
end;
|
|
|
|
|
2020-10-01 15:08:49 +00:00
|
|
|
|
|
|
|
procedure TBasicStatsChartForm.Reset;
|
|
|
|
begin
|
|
|
|
inherited;
|
|
|
|
if Assigned(FChartFrame) then
|
|
|
|
FChartFrame.Clear;
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
procedure TBasicStatsChartForm.UpdateBtnStates;
|
|
|
|
begin
|
|
|
|
inherited;
|
|
|
|
if Assigned(FChartFrame) then
|
|
|
|
FChartFrame.UpdateBtnStates;
|
|
|
|
end;
|
|
|
|
|
2020-10-01 14:05:43 +00:00
|
|
|
end.
|
|
|
|
|