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