LazStats: Fix compilation with Laz 2.0.10

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7662 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-09-11 09:54:50 +00:00
parent 0b891471b9
commit e13d7e6e25
3 changed files with 18 additions and 5 deletions

View File

@ -12,7 +12,7 @@ unit DistribUnit;
interface
uses
Classes, SysUtils, FileUtil, TAFuncSeries, //TAGraph, TAFuncSeries, TASeries,
Classes, SysUtils, FileUtil, LCLVersion, TAFuncSeries, //TAGraph, TAFuncSeries, TASeries,
//PrintersDlgs, LResources,
Forms, Controls, Graphics, Dialogs, StdCtrls,
//Printers,
@ -122,7 +122,10 @@ begin
funcSer.Title := ATitle;
if Cumulative then funcSer.Tag := 1;
if XMin = 0 then
funcSer.DomainExclusions.AddRange(-Infinity, 0, [ioOpenEnd]);
funcSer.DomainExclusions.AddRange(
-Infinity, 0
{$IF LCL_FullVersion >= 2010000}, [ioOpenEnd] {$IFEND}
);
ChartFrame.Chart.AddSeries(funcSer);
if Cumulative then

View File

@ -59,12 +59,10 @@ object ChartFrame: TChartFrame
Top = 272
object ZoomDragTool: TZoomDragTool
Shift = [ssLeft]
LimitToExtent = [zdDown]
Brush.Style = bsClear
end
object PanDragTool: TPanDragTool
Shift = [ssRight]
LimitToExtent = [pdDown]
end
end
end

View File

@ -5,7 +5,7 @@ unit ChartFrameUnit;
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, ExtDlgs, PrintersDlgs,
Classes, SysUtils, LCLVersion, Forms, Controls, Graphics, ExtDlgs, PrintersDlgs,
TAGraph, TATypes, TACustomSource, TACustomSeries, TASeries, TATools,
Globals;
@ -28,6 +28,7 @@ type
ALineStyle: TPenStyle; ALegendTitle: String): TConstantLine;
public
constructor Create(AOwner: TComponent); override;
procedure Clear;
procedure GetXRange(out XMin, XMax: Double; Logical: Boolean = true);
procedure GetYRange(out YMin, YMax: Double; Logical: Boolean = true);
@ -54,6 +55,17 @@ uses
Math, Printers, OSPrinters,
TAChartUtils, TADrawerSVG, TAPrint;
constructor TChartFrame.Create(AOwner: TComponent);
begin
inherited;
{$IF LCL_FullVersion >= 2010000}
ZoomDragTool.LimitToExtent := [zdDown];
PanDragTool.LimitToExtent := [pdDown];
{$IFEND}
end;
procedure TChartFrame.Clear;
begin
Chart.ClearSeries;