mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-26 01:48:13 +02:00
TAChart: Clean up.
git-svn-id: trunk@51601 -
This commit is contained in:
parent
0e74507516
commit
f8a92e54e0
@ -7,7 +7,7 @@ object Form1: TForm1
|
|||||||
ClientHeight = 438
|
ClientHeight = 438
|
||||||
ClientWidth = 637
|
ClientWidth = 637
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
LCLVersion = '0.9.31'
|
LCLVersion = '1.7'
|
||||||
object Splitter1: TSplitter
|
object Splitter1: TSplitter
|
||||||
Left = 632
|
Left = 632
|
||||||
Height = 438
|
Height = 438
|
||||||
@ -28,7 +28,7 @@ object Form1: TForm1
|
|||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object tsBasic: TTabSheet
|
object tsBasic: TTabSheet
|
||||||
Caption = 'Basic'
|
Caption = 'Basic'
|
||||||
ClientHeight = 412
|
ClientHeight = 410
|
||||||
ClientWidth = 624
|
ClientWidth = 624
|
||||||
object Memo1: TMemo
|
object Memo1: TMemo
|
||||||
Left = 0
|
Left = 0
|
||||||
@ -44,7 +44,7 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object Chart2: TChart
|
object Chart2: TChart
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 378
|
Height = 376
|
||||||
Top = 34
|
Top = 34
|
||||||
Width = 333
|
Width = 333
|
||||||
AxisList = <
|
AxisList = <
|
||||||
@ -64,7 +64,6 @@ object Form1: TForm1
|
|||||||
'TAChart'
|
'TAChart'
|
||||||
)
|
)
|
||||||
Align = alClient
|
Align = alClient
|
||||||
ParentColor = False
|
|
||||||
object Chart2LineSeries1: TLineSeries
|
object Chart2LineSeries1: TLineSeries
|
||||||
LinePen.Color = clRed
|
LinePen.Color = clRed
|
||||||
Pointer.Brush.Color = clRed
|
Pointer.Brush.Color = clRed
|
||||||
@ -79,7 +78,7 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object Chart1: TChart
|
object Chart1: TChart
|
||||||
Left = 333
|
Left = 333
|
||||||
Height = 378
|
Height = 376
|
||||||
Top = 34
|
Top = 34
|
||||||
Width = 291
|
Width = 291
|
||||||
AxisList = <
|
AxisList = <
|
||||||
@ -99,7 +98,6 @@ object Form1: TForm1
|
|||||||
'TAChart'
|
'TAChart'
|
||||||
)
|
)
|
||||||
Align = alRight
|
Align = alRight
|
||||||
ParentColor = False
|
|
||||||
object Chart1BarSeries1: TBarSeries
|
object Chart1BarSeries1: TBarSeries
|
||||||
BarBrush.Color = clRed
|
BarBrush.Color = clRed
|
||||||
Source = RandomChartSource1
|
Source = RandomChartSource1
|
||||||
@ -115,11 +113,11 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object tsStatistics: TTabSheet
|
object tsStatistics: TTabSheet
|
||||||
Caption = 'Statistics'
|
Caption = 'Statistics'
|
||||||
ClientHeight = 412
|
ClientHeight = 410
|
||||||
ClientWidth = 624
|
ClientWidth = 624
|
||||||
object chCalc: TChart
|
object chCalc: TChart
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 378
|
Height = 376
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 624
|
Width = 624
|
||||||
AxisList = <
|
AxisList = <
|
||||||
@ -144,7 +142,6 @@ object Form1: TForm1
|
|||||||
'TAChart'
|
'TAChart'
|
||||||
)
|
)
|
||||||
Align = alClient
|
Align = alClient
|
||||||
ParentColor = False
|
|
||||||
object chCalcLineSeries1: TLineSeries
|
object chCalcLineSeries1: TLineSeries
|
||||||
Title = 'Data'
|
Title = 'Data'
|
||||||
LineType = ltNone
|
LineType = ltNone
|
||||||
@ -168,7 +165,7 @@ object Form1: TForm1
|
|||||||
object Panel2: TPanel
|
object Panel2: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 34
|
Height = 34
|
||||||
Top = 378
|
Top = 376
|
||||||
Width = 624
|
Width = 624
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
ClientHeight = 34
|
ClientHeight = 34
|
||||||
@ -176,9 +173,9 @@ object Form1: TForm1
|
|||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object cbCumulative: TCheckBox
|
object cbCumulative: TCheckBox
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 17
|
Height = 19
|
||||||
Top = 7
|
Top = 7
|
||||||
Width = 73
|
Width = 81
|
||||||
Caption = 'Cumulative'
|
Caption = 'Cumulative'
|
||||||
Checked = True
|
Checked = True
|
||||||
OnChange = cbCumulativeChange
|
OnChange = cbCumulativeChange
|
||||||
@ -187,10 +184,10 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object cbAccDirStatistics: TComboBox
|
object cbAccDirStatistics: TComboBox
|
||||||
Left = 108
|
Left = 108
|
||||||
Height = 21
|
Height = 23
|
||||||
Top = 7
|
Top = 7
|
||||||
Width = 100
|
Width = 100
|
||||||
ItemHeight = 13
|
ItemHeight = 15
|
||||||
ItemIndex = 0
|
ItemIndex = 0
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
'Backward'
|
'Backward'
|
||||||
@ -206,11 +203,11 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object tsDerivative: TTabSheet
|
object tsDerivative: TTabSheet
|
||||||
Caption = 'Derivative'
|
Caption = 'Derivative'
|
||||||
ClientHeight = 412
|
ClientHeight = 410
|
||||||
ClientWidth = 624
|
ClientWidth = 624
|
||||||
object chDerivative: TChart
|
object chDerivative: TChart
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 327
|
Height = 325
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 624
|
Width = 624
|
||||||
AxisList = <
|
AxisList = <
|
||||||
@ -241,7 +238,6 @@ object Form1: TForm1
|
|||||||
)
|
)
|
||||||
Align = alClient
|
Align = alClient
|
||||||
DoubleBuffered = True
|
DoubleBuffered = True
|
||||||
ParentColor = False
|
|
||||||
object chDerivativeLineOrig: TLineSeries
|
object chDerivativeLineOrig: TLineSeries
|
||||||
Title = 'y'
|
Title = 'y'
|
||||||
Source = lcsDerivative
|
Source = lcsDerivative
|
||||||
@ -255,7 +251,7 @@ object Form1: TForm1
|
|||||||
object rgDataShape: TRadioGroup
|
object rgDataShape: TRadioGroup
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 54
|
Height = 54
|
||||||
Top = 327
|
Top = 325
|
||||||
Width = 624
|
Width = 624
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
AutoFill = True
|
AutoFill = True
|
||||||
@ -268,7 +264,7 @@ object Form1: TForm1
|
|||||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
ChildSizing.ControlsPerLine = 7
|
ChildSizing.ControlsPerLine = 7
|
||||||
ClientHeight = 36
|
ClientHeight = 34
|
||||||
ClientWidth = 620
|
ClientWidth = 620
|
||||||
Columns = 7
|
Columns = 7
|
||||||
ItemIndex = 0
|
ItemIndex = 0
|
||||||
@ -288,7 +284,7 @@ object Form1: TForm1
|
|||||||
object Panel1: TPanel
|
object Panel1: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 31
|
Height = 31
|
||||||
Top = 381
|
Top = 379
|
||||||
Width = 624
|
Width = 624
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
@ -297,27 +293,27 @@ object Form1: TForm1
|
|||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object lblAccumulationRange: TLabel
|
object lblAccumulationRange: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 14
|
Height = 15
|
||||||
Top = 9
|
Top = 9
|
||||||
Width = 95
|
Width = 108
|
||||||
Caption = 'AccumulationRange'
|
Caption = 'AccumulationRange'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object seAccumulationRange: TSpinEdit
|
object seAccumulationRange: TSpinEdit
|
||||||
Left = 116
|
Left = 124
|
||||||
Height = 21
|
Height = 23
|
||||||
Top = 4
|
Top = 4
|
||||||
Width = 82
|
Width = 74
|
||||||
OnChange = seAccumulationRangeChange
|
OnChange = seAccumulationRangeChange
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
Value = 2
|
Value = 2
|
||||||
end
|
end
|
||||||
object cbAccDirDerivative: TComboBox
|
object cbAccDirDerivative: TComboBox
|
||||||
Left = 216
|
Left = 216
|
||||||
Height = 21
|
Height = 23
|
||||||
Top = 4
|
Top = 4
|
||||||
Width = 100
|
Width = 100
|
||||||
ItemHeight = 13
|
ItemHeight = 15
|
||||||
ItemIndex = 0
|
ItemIndex = 0
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
'Backward'
|
'Backward'
|
||||||
@ -331,9 +327,9 @@ object Form1: TForm1
|
|||||||
end
|
end
|
||||||
object cbSmooth: TCheckBox
|
object cbSmooth: TCheckBox
|
||||||
Left = 332
|
Left = 332
|
||||||
Height = 17
|
Height = 19
|
||||||
Top = 5
|
Top = 5
|
||||||
Width = 56
|
Width = 62
|
||||||
Caption = 'Smooth'
|
Caption = 'Smooth'
|
||||||
OnChange = cbSmoothChange
|
OnChange = cbSmoothChange
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
@ -184,6 +184,7 @@ procedure TDataPointsEditorForm.sgDataPrepareCanvas(sender: TObject; aCol,
|
|||||||
var
|
var
|
||||||
ts: TTextStyle;
|
ts: TTextStyle;
|
||||||
begin
|
begin
|
||||||
|
Unused(aRow, aState);
|
||||||
if ACol = 0 then begin
|
if ACol = 0 then begin
|
||||||
ts := TStringGrid(Sender).Canvas.TextStyle;
|
ts := TStringGrid(Sender).Canvas.TextStyle;
|
||||||
ts.Alignment := taRightJustify;
|
ts.Alignment := taRightJustify;
|
||||||
|
@ -158,7 +158,7 @@ var
|
|||||||
d, s: Cardinal;
|
d, s: Cardinal;
|
||||||
begin
|
begin
|
||||||
Unused(ASender);
|
Unused(ASender);
|
||||||
d := GetTickCount - FStartTime;
|
d := GetTickCount64 - FStartTime;
|
||||||
if d >= AnimationTime then
|
if d >= AnimationTime then
|
||||||
Stop(true);
|
Stop(true);
|
||||||
s := Round(d * ProjectedSteps / AnimationTime);
|
s := Round(d * ProjectedSteps / AnimationTime);
|
||||||
@ -200,7 +200,7 @@ begin
|
|||||||
FSkippedFramesCount := 0;
|
FSkippedFramesCount := 0;
|
||||||
if (AnimationInterval = 0) or (AnimationTime <= AnimationInterval) then exit;
|
if (AnimationInterval = 0) or (AnimationTime <= AnimationInterval) then exit;
|
||||||
FProjectedSteps := Round(AnimationTime / AnimationInterval);
|
FProjectedSteps := Round(AnimationTime / AnimationInterval);
|
||||||
FStartTime := GetTickCount;
|
FStartTime := GetTickCount64;
|
||||||
FTimer.Interval := AnimationInterval;
|
FTimer.Interval := AnimationInterval;
|
||||||
FTimer.Enabled := true;
|
FTimer.Enabled := true;
|
||||||
end;
|
end;
|
||||||
|
@ -95,19 +95,6 @@ type
|
|||||||
end;
|
end;
|
||||||
PChartDataItem = ^TChartDataItem;
|
PChartDataItem = ^TChartDataItem;
|
||||||
|
|
||||||
TChartLinkKind = (lkStraight, lkAngled);
|
|
||||||
|
|
||||||
TChartLinkItem = packed record
|
|
||||||
FromIndex: Integer;
|
|
||||||
ToIndex: Integer;
|
|
||||||
case Kind: TChartLinkKind of
|
|
||||||
lkStraight: ();
|
|
||||||
lkAngled : (ForwardAnglePos: Double;
|
|
||||||
BackwardAnglePos: array[0..2] of Double);
|
|
||||||
end;
|
|
||||||
|
|
||||||
PChartLinkItem = ^TChartLinkItem;
|
|
||||||
|
|
||||||
TGraphToImageFunc = function (AX: Double): Integer of object;
|
TGraphToImageFunc = function (AX: Double): Integer of object;
|
||||||
TIntegerTransformFunc = function (AX: Integer): Integer of object;
|
TIntegerTransformFunc = function (AX: Integer): Integer of object;
|
||||||
|
|
||||||
@ -171,8 +158,6 @@ type
|
|||||||
|
|
||||||
function GetCount: Integer; virtual; abstract;
|
function GetCount: Integer; virtual; abstract;
|
||||||
function GetItem(AIndex: Integer): PChartDataItem; virtual; abstract;
|
function GetItem(AIndex: Integer): PChartDataItem; virtual; abstract;
|
||||||
function GetLink(AIndex: Integer): PChartLinkItem; virtual; abstract;
|
|
||||||
function GetLinkCount: Integer; virtual; abstract;
|
|
||||||
procedure InvalidateCaches;
|
procedure InvalidateCaches;
|
||||||
procedure SetYCount(AValue: Cardinal); virtual; abstract;
|
procedure SetYCount(AValue: Cardinal); virtual; abstract;
|
||||||
public
|
public
|
||||||
@ -201,7 +186,6 @@ type
|
|||||||
|
|
||||||
property Count: Integer read GetCount;
|
property Count: Integer read GetCount;
|
||||||
property Item[AIndex: Integer]: PChartDataItem read GetItem; default;
|
property Item[AIndex: Integer]: PChartDataItem read GetItem; default;
|
||||||
property Link[AIndex: Integer]: PChartLinkItem read GetLink;
|
|
||||||
property YCount: Cardinal read FYCount write SetYCount default 1;
|
property YCount: Cardinal read FYCount write SetYCount default 1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user