mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 20:59:06 +02:00
TAChart/LiveView demo: fix typo.
git-svn-id: trunk@65471 -
This commit is contained in:
parent
15a417978a
commit
96620aa28b
@ -15,7 +15,6 @@
|
|||||||
<XPManifest>
|
<XPManifest>
|
||||||
<DpiAware Value="True"/>
|
<DpiAware Value="True"/>
|
||||||
</XPManifest>
|
</XPManifest>
|
||||||
<Icon Value="0"/>
|
|
||||||
</General>
|
</General>
|
||||||
<BuildModes Count="1">
|
<BuildModes Count="1">
|
||||||
<Item1 Name="Default" Default="True"/>
|
<Item1 Name="Default" Default="True"/>
|
||||||
@ -43,7 +42,7 @@
|
|||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<ComponentName Value="MainFrom"/>
|
<ComponentName Value="MainForm"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
|
@ -19,7 +19,7 @@ begin
|
|||||||
RequireDerivedFormResource:=True;
|
RequireDerivedFormResource:=True;
|
||||||
Application.Scaled:=True;
|
Application.Scaled:=True;
|
||||||
Application.Initialize;
|
Application.Initialize;
|
||||||
Application.CreateForm(TMainFrom, MainFrom);
|
Application.CreateForm(TMainForm, MainForm);
|
||||||
Application.Run;
|
Application.Run;
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
object MainFrom: TMainFrom
|
object MainForm: TMainForm
|
||||||
Left = 299
|
Left = 299
|
||||||
Height = 446
|
Height = 446
|
||||||
Top = 130
|
Top = 130
|
||||||
@ -7,7 +7,7 @@ object MainFrom: TMainFrom
|
|||||||
ClientHeight = 446
|
ClientHeight = 446
|
||||||
ClientWidth = 723
|
ClientWidth = 723
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
LCLVersion = '2.1.0.0'
|
LCLVersion = '2.3.0.0'
|
||||||
object Chart1: TChart
|
object Chart1: TChart
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = Owner
|
AnchorSideTop.Control = Owner
|
||||||
@ -106,7 +106,6 @@ object MainFrom: TMainFrom
|
|||||||
Width = 69
|
Width = 69
|
||||||
BorderSpacing.Left = 24
|
BorderSpacing.Left = 24
|
||||||
Caption = 'Viewport size'
|
Caption = 'Viewport size'
|
||||||
ParentColor = False
|
|
||||||
Visible = False
|
Visible = False
|
||||||
end
|
end
|
||||||
object seViewportSize: TFloatSpinEdit
|
object seViewportSize: TFloatSpinEdit
|
||||||
@ -120,7 +119,6 @@ object MainFrom: TMainFrom
|
|||||||
Width = 73
|
Width = 73
|
||||||
Alignment = taRightJustify
|
Alignment = taRightJustify
|
||||||
BorderSpacing.Left = 8
|
BorderSpacing.Left = 8
|
||||||
MaxValue = 0
|
|
||||||
OnChange = seViewportSizeChange
|
OnChange = seViewportSizeChange
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
Value = 5
|
Value = 5
|
||||||
@ -170,7 +168,6 @@ object MainFrom: TMainFrom
|
|||||||
Width = 40
|
Width = 40
|
||||||
BorderSpacing.Left = 24
|
BorderSpacing.Left = 24
|
||||||
Caption = 'ExtentY'
|
Caption = 'ExtentY'
|
||||||
ParentColor = False
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object ChartNavScrollBar1: TChartNavScrollBar
|
object ChartNavScrollBar1: TChartNavScrollBar
|
||||||
|
@ -10,9 +10,9 @@ uses
|
|||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TMainFrom }
|
{ TMainForm }
|
||||||
|
|
||||||
TMainFrom = class(TForm)
|
TMainForm = class(TForm)
|
||||||
btnAddDataPoint: TButton;
|
btnAddDataPoint: TButton;
|
||||||
Chart1: TChart;
|
Chart1: TChart;
|
||||||
Chart1LineSeries1: TLineSeries;
|
Chart1LineSeries1: TLineSeries;
|
||||||
@ -38,7 +38,7 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
MainFrom: TMainFrom;
|
MainForm: TMainForm;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -47,9 +47,9 @@ implementation
|
|||||||
uses
|
uses
|
||||||
Math, TAChartUtils;
|
Math, TAChartUtils;
|
||||||
|
|
||||||
{ TMainFrom }
|
{ TMainForm }
|
||||||
|
|
||||||
procedure TMainFrom.btnAddDataPointClick(Sender: TObject);
|
procedure TMainForm.btnAddDataPointClick(Sender: TObject);
|
||||||
const
|
const
|
||||||
TWO_PI = 2.0 * pi;
|
TWO_PI = 2.0 * pi;
|
||||||
var
|
var
|
||||||
@ -60,7 +60,7 @@ begin
|
|||||||
Chart1Lineseries1.AddXY(x, y);
|
Chart1Lineseries1.AddXY(x, y);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainFrom.cbFixedExtentChange(Sender: TObject);
|
procedure TMainForm.cbFixedExtentChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Chart1.Extent.YMin := -1.5;
|
Chart1.Extent.YMin := -1.5;
|
||||||
Chart1.Extent.YMax := 1.5;
|
Chart1.Extent.YMax := 1.5;
|
||||||
@ -68,7 +68,7 @@ begin
|
|||||||
Chart1.Extent.UseYMax := cbFixedExtent.Checked;
|
Chart1.Extent.UseYMax := cbFixedExtent.Checked;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainFrom.cbLiveModeChange(Sender: TObject);
|
procedure TMainForm.cbLiveModeChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ChartLiveView1.Active := cbLiveMode.Checked;
|
ChartLiveView1.Active := cbLiveMode.Checked;
|
||||||
seViewportSize.Visible := cbLiveMode.Checked;
|
seViewportSize.Visible := cbLiveMode.Checked;
|
||||||
@ -77,12 +77,12 @@ begin
|
|||||||
lblExtentY.Visible := cbLiveMode.Checked;
|
lblExtentY.Visible := cbLiveMode.Checked;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainFrom.cbExtentYChange(Sender: TObject);
|
procedure TMainForm.cbExtentYChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ChartLiveView1.ExtentY := TChartLiveViewExtentY(cbExtentY.ItemIndex);
|
ChartLiveView1.ExtentY := TChartLiveViewExtentY(cbExtentY.ItemIndex);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainFrom.FormCreate(Sender: TObject);
|
procedure TMainForm.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
// Add three data points to start with
|
// Add three data points to start with
|
||||||
btnAddDataPointClick(nil);
|
btnAddDataPointClick(nil);
|
||||||
@ -95,7 +95,7 @@ begin
|
|||||||
cbExtentY.ItemIndex := ord(ChartLiveView1.ExtentY);
|
cbExtentY.ItemIndex := ord(ChartLiveView1.ExtentY);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainFrom.seViewportSizeChange(Sender: TObject);
|
procedure TMainForm.seViewportSizeChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ChartLiveView1.ViewportSize := seViewportSize.Value;
|
ChartLiveView1.ViewportSize := seViewportSize.Value;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user