mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 23:10:16 +02:00
TAChart: Add independent axis zooming to the axis transformation demo
git-svn-id: trunk@29308 -
This commit is contained in:
parent
f3bc3be027
commit
6141a3b5dd
@ -104,6 +104,26 @@ object Form1: TForm1
|
|||||||
OnChange = cbAutoChange
|
OnChange = cbAutoChange
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
|
object fseSummerZoom: TFloatSpinEdit
|
||||||
|
Left = 236
|
||||||
|
Height = 21
|
||||||
|
Top = 4
|
||||||
|
Width = 50
|
||||||
|
Increment = 0.5
|
||||||
|
MaxValue = 10
|
||||||
|
MinValue = 0.5
|
||||||
|
OnChange = fseSummerZoomChange
|
||||||
|
TabOrder = 1
|
||||||
|
Value = 1
|
||||||
|
end
|
||||||
|
object lblSummerZoom: TLabel
|
||||||
|
Left = 112
|
||||||
|
Height = 14
|
||||||
|
Top = 5
|
||||||
|
Width = 117
|
||||||
|
Caption = 'Additional left axis zoom'
|
||||||
|
ParentColor = False
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object tsLog: TTabSheet
|
object tsLog: TTabSheet
|
||||||
@ -250,6 +270,8 @@ object Form1: TForm1
|
|||||||
object catTAutoScaleAxisTransform1: TAutoScaleAxisTransform
|
object catTAutoScaleAxisTransform1: TAutoScaleAxisTransform
|
||||||
Enabled = False
|
Enabled = False
|
||||||
end
|
end
|
||||||
|
object catTZoom: TLinearAxisTransform
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object rcsTSummer: TRandomChartSource
|
object rcsTSummer: TRandomChartSource
|
||||||
PointsNumber = 20
|
PointsNumber = 20
|
||||||
|
@ -5,8 +5,8 @@ unit Main;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
ComCtrls, ExtCtrls, Forms, StdCtrls, TAFuncSeries, TAGraph,
|
ComCtrls, ExtCtrls, Forms, Spin, StdCtrls, TAFuncSeries, TAGraph,
|
||||||
TASeries, TASources, TAStyles, TATools, TATransformations;
|
TASeries, TASources, TAStyles, TATools, TATransformations, Classes;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -16,6 +16,7 @@ type
|
|||||||
catTAutoAutoScaleAxisTransform1: TAutoScaleAxisTransform;
|
catTAutoAutoScaleAxisTransform1: TAutoScaleAxisTransform;
|
||||||
catTAutoScaleAxisTransform1: TAutoScaleAxisTransform;
|
catTAutoScaleAxisTransform1: TAutoScaleAxisTransform;
|
||||||
catTAuto: TChartAxisTransformations;
|
catTAuto: TChartAxisTransformations;
|
||||||
|
catTZoom: TLinearAxisTransform;
|
||||||
cbAuto: TCheckBox;
|
cbAuto: TCheckBox;
|
||||||
catUser: TChartAxisTransformations;
|
catUser: TChartAxisTransformations;
|
||||||
catUserUserDefinedAxisTransform1: TUserDefinedAxisTransform;
|
catUserUserDefinedAxisTransform1: TUserDefinedAxisTransform;
|
||||||
@ -38,6 +39,8 @@ type
|
|||||||
catTFahrToCel: TLinearAxisTransform;
|
catTFahrToCel: TLinearAxisTransform;
|
||||||
ChartTSummer: TLineSeries;
|
ChartTSummer: TLineSeries;
|
||||||
ChartTWinterLine: TLineSeries;
|
ChartTWinterLine: TLineSeries;
|
||||||
|
fseSummerZoom: TFloatSpinEdit;
|
||||||
|
lblSummerZoom: TLabel;
|
||||||
PageControl1: TPageControl;
|
PageControl1: TPageControl;
|
||||||
pnlLogControls: TPanel;
|
pnlLogControls: TPanel;
|
||||||
pnlAutoControls: TPanel;
|
pnlAutoControls: TPanel;
|
||||||
@ -53,6 +56,7 @@ type
|
|||||||
AX: Double; out AT: Double);
|
AX: Double; out AT: Double);
|
||||||
procedure ChartLogFuncSeries1Calculate(const AX: Double; out AY: Double);
|
procedure ChartLogFuncSeries1Calculate(const AX: Double; out AY: Double);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
|
procedure fseSummerZoomChange(Sender: TObject);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -118,5 +122,10 @@ begin
|
|||||||
@catUserUserDefinedAxisTransform1AxisToGraph;
|
@catUserUserDefinedAxisTransform1AxisToGraph;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TForm1.fseSummerZoomChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
catTZoom.Scale := 1 / fseSummerZoom.Value;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user