TAChart: Use axis interval tolerance in the axistransf demo

git-svn-id: trunk@34819 -
This commit is contained in:
ask 2012-01-20 11:38:23 +00:00
parent f917cbd144
commit 19cc5a8868
4 changed files with 32 additions and 13 deletions

View File

@ -340,13 +340,11 @@ object Form1: TForm1
top = 232
object ChartToolset1ZoomIn: TZoomClickTool
Shift = [ssLeft]
FixedPoint = True
ZoomFactor = 4
ZoomRatio = 0.25
end
object ChartToolset1ZoomOut: TZoomClickTool
Shift = [ssRight]
FixedPoint = True
ZoomFactor = 0.25
ZoomRatio = 4
end

View File

@ -60,7 +60,7 @@
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="10"/>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
@ -75,10 +75,6 @@
<SmartLinkUnit Value="True"/>
</CodeGeneration>
<Linking>
<Debugging>
<GenerateDebugInfo Value="True"/>
<DebugInfoType Value="dsAuto"/>
</Debugging>
<LinkSmart Value="True"/>
<Options>
<Win32>

View File

@ -224,15 +224,14 @@ object Form1: TForm1
ClientWidth = 525
object ChartLog: TChart
Left = 0
Height = 379
Height = 378
Top = 0
Width = 525
AxisList = <
item
Intervals.Count = 10
Intervals.MaxLength = 200
Intervals.NiceSteps = '1.0'
Intervals.Options = [aipGraphCoords, aipUseCount, aipUseMinLength, aipUseNiceSteps]
Intervals.Tolerance = 5
Marks.Stripes = csStripes
Minors = <
item
@ -295,11 +294,11 @@ object Form1: TForm1
end
object pnlLogControls: TPanel
Left = 0
Height = 29
Top = 379
Height = 30
Top = 378
Width = 525
Align = alBottom
ClientHeight = 29
ClientHeight = 30
ClientWidth = 525
TabOrder = 1
object cbLog: TCheckBox
@ -313,6 +312,22 @@ object Form1: TForm1
State = cbChecked
TabOrder = 0
end
object seTolerance: TSpinEdit
Left = 140
Height = 21
Top = 5
Width = 50
OnChange = seToleranceChange
TabOrder = 1
end
object lblTolerance: TLabel
Left = 88
Height = 14
Top = 8
Width = 48
Caption = 'Tolerance'
ParentColor = False
end
end
end
object tsCumulNormDistr: TTabSheet
@ -330,6 +345,7 @@ object Form1: TForm1
Grid.Visible = False
Intervals.Count = 30
Intervals.Options = [aipUseCount, aipUseNiceSteps]
Intervals.Tolerance = 1
Marks.OverlapPolicy = opHideNeighbour
Minors = <>
Title.LabelFont.Orientation = 900

View File

@ -56,6 +56,7 @@ type
edDataCount: TSpinEdit;
fseIndependent1: TFloatSpinEdit;
fseIndependent2: TFloatSpinEdit;
lblTolerance: TLabel;
lblDataCount: TLabel;
lblIndependentScale1: TLabel;
lblIndependentScale2: TLabel;
@ -68,6 +69,7 @@ type
rcsTSummer: TRandomChartSource;
rcsTWinter: TRandomChartSource;
rgRandDistr: TRadioGroup;
seTolerance: TSpinEdit;
tsLinear: TTabSheet;
tsCumulNormDistr: TTabSheet;
tsIndependent: TTabSheet;
@ -85,6 +87,7 @@ type
procedure fseIndependent1Change(Sender: TObject);
procedure fseIndependent2Change(Sender: TObject);
procedure rgRandDistrClick(Sender: TObject);
procedure seToleranceChange(Sender: TObject);
private
procedure FillIndependentSource;
procedure FillCumulNormDistrSource;
@ -242,6 +245,7 @@ begin
end;
FillIndependentSource;
FillCumulNormDistrSource;
seTolerance.Value := ChartLog.LeftAxis.Intervals.Tolerance;
end;
procedure TForm1.fseIndependent1Change(Sender: TObject);
@ -259,5 +263,10 @@ begin
FillCumulNormDistrSource;
end;
procedure TForm1.seToleranceChange(Sender: TObject);
begin
ChartLog.LeftAxis.Intervals.Tolerance := seTolerance.Value;
end;
end.