You've already forked lazarus-ccr
jvcllaz: Remove JvChart again: incomplete, too many bugs.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7182 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1,7 +1,6 @@
|
|||||||
tjvtabbar.bmp
|
tjvtabbar.bmp
|
||||||
tjvmoderntabbarpainter.bmp
|
tjvmoderntabbarpainter.bmp
|
||||||
tjvtabbarxppainter.bmp
|
tjvtabbarxppainter.bmp
|
||||||
tjvchart.bmp
|
|
||||||
tjvgammapanel.png
|
tjvgammapanel.png
|
||||||
tjvgammapanel_150.png
|
tjvgammapanel_150.png
|
||||||
tjvgammapanel_200.png
|
tjvgammapanel_200.png
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB |
@ -22,8 +22,7 @@ uses
|
|||||||
// JvTabBar, JvTabBarXPPainter,
|
// JvTabBar, JvTabBarXPPainter,
|
||||||
JvThumbImage, JvThumbnails, JvThumbViews,
|
JvThumbImage, JvThumbnails, JvThumbViews,
|
||||||
JvTimeLine, JvTMTimeLine, JvTimeLineEditor,
|
JvTimeLine, JvTMTimeLine, JvTimeLineEditor,
|
||||||
JvImagesViewer, JvImageListViewer, JvOwnerDrawViewer,
|
JvImagesViewer, JvImageListViewer, JvOwnerDrawViewer;
|
||||||
JvChart;
|
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
begin
|
begin
|
||||||
@ -34,8 +33,7 @@ begin
|
|||||||
TJvThumbView, TJvThumbnail, TJvThumbImage,
|
TJvThumbView, TJvThumbnail, TJvThumbImage,
|
||||||
TJvTimeLine, TJvTMTimeLine,
|
TJvTimeLine, TJvTMTimeLine,
|
||||||
TJvGammaPanel,
|
TJvGammaPanel,
|
||||||
TJvImagesViewer, TJvImageListViewer, TJvOwnerDrawViewer,
|
TJvImagesViewer, TJvImageListViewer, TJvOwnerDrawViewer
|
||||||
TJvChart
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Timeline
|
// Timeline
|
||||||
|
@ -1,98 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<CONFIG>
|
|
||||||
<ProjectOptions>
|
|
||||||
<Version Value="12"/>
|
|
||||||
<PathDelim Value="\"/>
|
|
||||||
<General>
|
|
||||||
<SessionStorage Value="InProjectDir"/>
|
|
||||||
<Title Value="JvChartDemo"/>
|
|
||||||
<Scaled Value="True"/>
|
|
||||||
<ResourceType Value="res"/>
|
|
||||||
<UseXPManifest Value="True"/>
|
|
||||||
<XPManifest>
|
|
||||||
<DpiAware Value="True"/>
|
|
||||||
</XPManifest>
|
|
||||||
<Icon Value="0"/>
|
|
||||||
</General>
|
|
||||||
<BuildModes>
|
|
||||||
<Item Name="Default" Default="True"/>
|
|
||||||
</BuildModes>
|
|
||||||
<PublishOptions>
|
|
||||||
<Version Value="2"/>
|
|
||||||
<UseFileFilters Value="True"/>
|
|
||||||
</PublishOptions>
|
|
||||||
<RunParams>
|
|
||||||
<FormatVersion Value="2"/>
|
|
||||||
<Modes Count="0"/>
|
|
||||||
</RunParams>
|
|
||||||
<RequiredPackages Count="3">
|
|
||||||
<Item1>
|
|
||||||
<PackageName Value="Printer4Lazarus"/>
|
|
||||||
</Item1>
|
|
||||||
<Item2>
|
|
||||||
<PackageName Value="JvCustomLazR"/>
|
|
||||||
</Item2>
|
|
||||||
<Item3>
|
|
||||||
<PackageName Value="LCL"/>
|
|
||||||
</Item3>
|
|
||||||
</RequiredPackages>
|
|
||||||
<Units>
|
|
||||||
<Unit>
|
|
||||||
<Filename Value="JvChartDemo.lpr"/>
|
|
||||||
<IsPartOfProject Value="True"/>
|
|
||||||
</Unit>
|
|
||||||
<Unit>
|
|
||||||
<Filename Value="jvchartdemofm.pas"/>
|
|
||||||
<IsPartOfProject Value="True"/>
|
|
||||||
<ComponentName Value="JvChartDemoForm"/>
|
|
||||||
<HasResources Value="True"/>
|
|
||||||
<ResourceBaseClass Value="Form"/>
|
|
||||||
<UnitName Value="JvChartDemoFm"/>
|
|
||||||
</Unit>
|
|
||||||
<Unit>
|
|
||||||
<Filename Value="statsclasses.pas"/>
|
|
||||||
<IsPartOfProject Value="True"/>
|
|
||||||
<UnitName Value="StatsClasses"/>
|
|
||||||
</Unit>
|
|
||||||
<Unit>
|
|
||||||
<Filename Value="jvpeneditor.pas"/>
|
|
||||||
<IsPartOfProject Value="True"/>
|
|
||||||
<ComponentName Value="PenEditorForm"/>
|
|
||||||
<HasResources Value="True"/>
|
|
||||||
<ResourceBaseClass Value="Form"/>
|
|
||||||
<UnitName Value="jvPenEditor"/>
|
|
||||||
</Unit>
|
|
||||||
</Units>
|
|
||||||
</ProjectOptions>
|
|
||||||
<CompilerOptions>
|
|
||||||
<Version Value="11"/>
|
|
||||||
<PathDelim Value="\"/>
|
|
||||||
<Target>
|
|
||||||
<Filename Value="..\..\bin\$(TargetCPU)-$(TargetOS)\JvChartDemo"/>
|
|
||||||
</Target>
|
|
||||||
<SearchPaths>
|
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
|
||||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
|
||||||
</SearchPaths>
|
|
||||||
<Linking>
|
|
||||||
<Options>
|
|
||||||
<Win32>
|
|
||||||
<GraphicApplication Value="True"/>
|
|
||||||
</Win32>
|
|
||||||
</Options>
|
|
||||||
</Linking>
|
|
||||||
</CompilerOptions>
|
|
||||||
<Debugging>
|
|
||||||
<Exceptions Count="3">
|
|
||||||
<Item1>
|
|
||||||
<Name Value="EAbort"/>
|
|
||||||
</Item1>
|
|
||||||
<Item2>
|
|
||||||
<Name Value="ECodetoolError"/>
|
|
||||||
</Item2>
|
|
||||||
<Item3>
|
|
||||||
<Name Value="EFOpenError"/>
|
|
||||||
</Item3>
|
|
||||||
</Exceptions>
|
|
||||||
</Debugging>
|
|
||||||
</CONFIG>
|
|
@ -1,20 +0,0 @@
|
|||||||
program JvChartDemo;
|
|
||||||
|
|
||||||
{$MODE OBJFPC}{$H+}
|
|
||||||
|
|
||||||
uses
|
|
||||||
Interfaces,
|
|
||||||
Forms, printer4lazarus,
|
|
||||||
JvChartDemoFm in 'JvChartDemoFm.pas' {JvChartDemoForm},
|
|
||||||
StatsClasses in 'StatsClasses.pas', jvPenEditor;
|
|
||||||
|
|
||||||
{$R *.res}
|
|
||||||
|
|
||||||
|
|
||||||
begin
|
|
||||||
Application.Initialize;
|
|
||||||
Application.Title:='JvChartDemo';
|
|
||||||
Application.Scaled := true;
|
|
||||||
Application.CreateForm(TJvChartDemoForm, JvChartDemoForm);
|
|
||||||
Application.Run;
|
|
||||||
end.
|
|
@ -1,621 +0,0 @@
|
|||||||
object JvChartDemoForm: TJvChartDemoForm
|
|
||||||
Left = 436
|
|
||||||
Height = 453
|
|
||||||
Top = 278
|
|
||||||
Width = 785
|
|
||||||
Caption = 'JEDI JvChart Demo'
|
|
||||||
ClientHeight = 433
|
|
||||||
ClientWidth = 785
|
|
||||||
Color = clWindow
|
|
||||||
Menu = MainMenu1
|
|
||||||
OnCreate = FormCreate
|
|
||||||
OnDestroy = FormDestroy
|
|
||||||
OnResize = FormResize
|
|
||||||
Position = poScreenCenter
|
|
||||||
LCLVersion = '2.1.0.0'
|
|
||||||
object Chart: TJvChart
|
|
||||||
Left = 164
|
|
||||||
Height = 398
|
|
||||||
Top = 35
|
|
||||||
Width = 621
|
|
||||||
Align = alClient
|
|
||||||
Options.XAxisValuesPerDivision = 10
|
|
||||||
Options.XAxisLabelAlignment = taLeftJustify
|
|
||||||
Options.XAxisDateTimeMode = False
|
|
||||||
Options.XAxisDateTimeDivision = 0
|
|
||||||
Options.XAxisLegendSkipBy = 2
|
|
||||||
Options.PenCount = 3
|
|
||||||
Options.XGap = 0
|
|
||||||
Options.XOrigin = 0
|
|
||||||
Options.YOrigin = 0
|
|
||||||
Options.XStartOffset = 60
|
|
||||||
Options.PrimaryYAxis.YMax = 20
|
|
||||||
Options.PrimaryYAxis.YMin = 0
|
|
||||||
Options.PrimaryYAxis.YLegendDecimalPlaces = 1
|
|
||||||
Options.SecondaryYAxis.YMax = 140
|
|
||||||
Options.SecondaryYAxis.YMin = 0
|
|
||||||
Options.SecondaryYAxis.YLegendDecimalPlaces = 0
|
|
||||||
Options.SecondaryYAxis.DefaultYLegends = 60
|
|
||||||
Options.MouseDragObjects = False
|
|
||||||
Options.Legend = clChartLegendBelow
|
|
||||||
Options.LegendRowCount = 1
|
|
||||||
Options.XValueCount = 20
|
|
||||||
Options.HeaderFont.Color = clWindowText
|
|
||||||
Options.LegendFont.Color = clWindowText
|
|
||||||
Options.AxisFont.Color = clWindowText
|
|
||||||
Options.AxisTitleFont.Height = -16
|
|
||||||
Options.AxisTitleFont.Orientation = 900
|
|
||||||
Options.AxisTitleFont.Style = [fsBold]
|
|
||||||
Options.CursorColor = clBlack
|
|
||||||
Options.CursorStyle = psDot
|
|
||||||
OnBeginFloatingMarkerDrag = ChartBeginFloatingMarkerDrag
|
|
||||||
OnEndFloatingMarkerDrag = ChartEndFloatingMarkerDrag
|
|
||||||
end
|
|
||||||
object Splitter1: TSplitter
|
|
||||||
Left = 159
|
|
||||||
Height = 398
|
|
||||||
Top = 35
|
|
||||||
Width = 5
|
|
||||||
end
|
|
||||||
object PanelTop: TPanel
|
|
||||||
Left = 0
|
|
||||||
Height = 35
|
|
||||||
Top = 0
|
|
||||||
Width = 785
|
|
||||||
Align = alTop
|
|
||||||
ClientHeight = 35
|
|
||||||
ClientWidth = 785
|
|
||||||
Font.CharSet = ANSI_CHARSET
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -13
|
|
||||||
Font.Name = 'Verdana'
|
|
||||||
ParentFont = False
|
|
||||||
TabOrder = 0
|
|
||||||
object ButtonBarChart: TSpeedButton
|
|
||||||
Left = 5
|
|
||||||
Height = 25
|
|
||||||
Hint = 'Bar Chart'
|
|
||||||
Top = 5
|
|
||||||
Width = 25
|
|
||||||
Flat = True
|
|
||||||
Glyph.Data = {
|
|
||||||
76010000424D7601000000000000760000002800000020000000100000000100
|
|
||||||
04000000000000010000120B0000120B00001000000000000000000000000000
|
|
||||||
800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
|
|
||||||
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333300030003
|
|
||||||
0003333377737773777333333333333333333FFFFFFFFFFFFFFF770000000000
|
|
||||||
0000777777777777777733039993BBB3CCC3337F737F737F737F37039993BBB3
|
|
||||||
CCC3377F737F737F737F33039993BBB3CCC33F7F737F737F737F77079997BBB7
|
|
||||||
CCC77777737773777377330399930003CCC3337F737F7773737F370399933333
|
|
||||||
CCC3377F737F3333737F330399933333CCC33F7F737FFFFF737F770700077777
|
|
||||||
CCC77777777777777377330333333333CCC3337F33333333737F370333333333
|
|
||||||
0003377F33333333777333033333333333333F7FFFFFFFFFFFFF770777777777
|
|
||||||
7777777777777777777733333333333333333333333333333333
|
|
||||||
}
|
|
||||||
GroupIndex = 1
|
|
||||||
NumGlyphs = 2
|
|
||||||
OnClick = ButtonBarChartClick
|
|
||||||
ShowHint = True
|
|
||||||
ParentShowHint = False
|
|
||||||
end
|
|
||||||
object ButtonLine: TSpeedButton
|
|
||||||
Left = 58
|
|
||||||
Height = 25
|
|
||||||
Hint = 'Line Chart'
|
|
||||||
Top = 5
|
|
||||||
Width = 25
|
|
||||||
Down = True
|
|
||||||
Flat = True
|
|
||||||
Glyph.Data = {
|
|
||||||
76010000424D7601000000000000760000002800000020000000100000000100
|
|
||||||
04000000000000010000120B0000120B00001000000000000000000000000000
|
|
||||||
800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
|
|
||||||
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00337333733373
|
|
||||||
3373337F3F7F3F7F3F7F33737373737373733F7F7F7F7F7F7F7F770000000000
|
|
||||||
000077777777777777773303333333333333337FF333333F33333709333333C3
|
|
||||||
333337773F3FF373F333330393993C3C33333F7F7F77F7F7FFFF77079797977C
|
|
||||||
77777777777777777777330339339333C333337FF73373F37F33370C333C3933
|
|
||||||
933337773F3737F37FF33303C3C33939C9333F7F7F7FF7F777FF7707C7C77797
|
|
||||||
7C97777777777777777733033C3333333C33337F37F33333373F37033C333333
|
|
||||||
33C3377F37333333337333033333333333333F7FFFFFFFFFFFFF770777777777
|
|
||||||
7777777777777777777733333333333333333333333333333333
|
|
||||||
}
|
|
||||||
GroupIndex = 1
|
|
||||||
NumGlyphs = 2
|
|
||||||
OnClick = ButtonLineClick
|
|
||||||
ShowHint = True
|
|
||||||
ParentShowHint = False
|
|
||||||
end
|
|
||||||
object ButtonStackedBarAve: TSpeedButton
|
|
||||||
Left = 345
|
|
||||||
Height = 25
|
|
||||||
Hint = 'Stacked Bars with Average'
|
|
||||||
Top = 7
|
|
||||||
Width = 25
|
|
||||||
Enabled = False
|
|
||||||
Flat = True
|
|
||||||
Glyph.Data = {
|
|
||||||
76010000424D7601000000000000760000002800000020000000100000000100
|
|
||||||
0400000000000001000000000000000000001000000000000000000000000000
|
|
||||||
80000080000000808000800000008000800080800000C0C0C000808080000000
|
|
||||||
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333300030003
|
|
||||||
0003333388838883888333333333333333333FFFFFFFFFFFFFFF880000000000
|
|
||||||
000088888888888888883303999399939993338F838F838F838F38039993BBB3
|
|
||||||
9993388F838F838F838F3303BBB3BBB399933F8F838F838F838F8808BBB8AAA8
|
|
||||||
999888888388838883883303AAA300039993338F838F8883838F3803AAA30003
|
|
||||||
BBB3388F838F3333838F3303AAA30003BBB33F8F838FFFFF838F880800080008
|
|
||||||
BBB88888888888888388330300030003AAA3338F33333333838F380300030003
|
|
||||||
0003388F33333333888333030003000300033F8FFFFFFFFFFFFF880888888888
|
|
||||||
8888888888888888888833333333333333333333333333333333
|
|
||||||
}
|
|
||||||
GroupIndex = 1
|
|
||||||
NumGlyphs = 2
|
|
||||||
OnClick = ButtonStackedBarAveClick
|
|
||||||
ShowHint = True
|
|
||||||
ParentShowHint = False
|
|
||||||
end
|
|
||||||
object ButtonStackedBar: TSpeedButton
|
|
||||||
Left = 111
|
|
||||||
Height = 25
|
|
||||||
Hint = 'Stacked Bars'
|
|
||||||
Top = 5
|
|
||||||
Width = 26
|
|
||||||
Flat = True
|
|
||||||
Glyph.Data = {
|
|
||||||
76010000424D7601000000000000760000002800000020000000100000000100
|
|
||||||
0400000000000001000000000000000000001000000000000000000000000000
|
|
||||||
80000080000000808000800000008000800080800000C0C0C000808080000000
|
|
||||||
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333300030003
|
|
||||||
0003333388838883888333333333333333333FFFFFFFFFFFFFFF880000000000
|
|
||||||
000088888888888888883303999399939993338F838F838F838F38039993BBB3
|
|
||||||
BBB3388F838F838F838F3303BBB3BBB3BBB33F8F838F838F838F8808BBB8AAA8
|
|
||||||
BBB888888388838883883303AAA30003BBB3338F838F8883838F3803AAA33333
|
|
||||||
BBB3388F838F3333838F3303AAA33333BBB33F8F838FFFFF838F880800088888
|
|
||||||
BBB88888888888888388330333333333AAA3338F33333333838F380333333333
|
|
||||||
0003388F33333333888333033333333333333F8FFFFFFFFFFFFF880888888888
|
|
||||||
8888888888888888888833333333333333333333333333333333
|
|
||||||
}
|
|
||||||
GroupIndex = 1
|
|
||||||
NumGlyphs = 2
|
|
||||||
OnClick = ButtonStackedBarClick
|
|
||||||
ShowHint = True
|
|
||||||
ParentShowHint = False
|
|
||||||
end
|
|
||||||
object ButtonBarAve: TSpeedButton
|
|
||||||
Left = 32
|
|
||||||
Height = 25
|
|
||||||
Hint = 'Bar Chart with Average Line'
|
|
||||||
Top = 5
|
|
||||||
Width = 25
|
|
||||||
Flat = True
|
|
||||||
Glyph.Data = {
|
|
||||||
76010000424D7601000000000000760000002800000020000000100000000100
|
|
||||||
0400000000000001000000000000000000001000000000000000000000000000
|
|
||||||
80000080000000808000800000008000800080800000C0C0C000808080000000
|
|
||||||
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333300030003
|
|
||||||
0003333388838883888333333333333333333FFFFFFFFFFFFFFF880000000000
|
|
||||||
0000888888888888888833039BA39BA39BA3338F838F838F838F38039BA39BA3
|
|
||||||
9BA3388F838F838F838F33039BA39BA39BA33F8F838F838F838F88089BA89BA8
|
|
||||||
9BA8888883888388838833039BA390A39BA3338F838F8883838F38039BA30B03
|
|
||||||
9BA3388F838F3333838F33039BA03B309BA33F8F838FFFFF838F88089B088B88
|
|
||||||
0BA8888888888888838833039033333390A3338F33333333838F380393333333
|
|
||||||
9BA3388F3333333388833303333333333B333F8FFFFFFFFFFFFF880888888888
|
|
||||||
8B88888888888888888833333333333333333333333333333333
|
|
||||||
}
|
|
||||||
GroupIndex = 1
|
|
||||||
NumGlyphs = 2
|
|
||||||
OnClick = ButtonBarAveClick
|
|
||||||
ShowHint = True
|
|
||||||
ParentShowHint = False
|
|
||||||
end
|
|
||||||
object ButtonPie: TSpeedButton
|
|
||||||
Left = 371
|
|
||||||
Height = 25
|
|
||||||
Hint = 'Show Pie Chart (one series only)'
|
|
||||||
Top = 7
|
|
||||||
Width = 25
|
|
||||||
Enabled = False
|
|
||||||
Flat = True
|
|
||||||
Glyph.Data = {
|
|
||||||
76010000424D7601000000000000760000002800000020000000100000000100
|
|
||||||
04000000000000010000120B0000120B00001000000000000000000000000000
|
|
||||||
800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
|
|
||||||
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333333333333
|
|
||||||
3333333333FFFFF3333333333700073333333FFF3777773F3FFF00030990BB03
|
|
||||||
000077737337F373777733309990BBB0333333373337F3373F3333099990BBBB
|
|
||||||
033333733337F33373F337999990BBBBB73337F33337F33337F330999990BBBB
|
|
||||||
B03337F33337FFFFF7F3309999900000003337F33337777777F33099990A0CCC
|
|
||||||
C03337F3337373F337F3379990AAA0CCC733373F3733373F373333090AAAAA0C
|
|
||||||
033333737333337373333330AAAAAAA033333FF73F33333733FF00330AAAAA03
|
|
||||||
3000773373FFFF73377733333700073333333333377777333333333333333333
|
|
||||||
3333333333333333333333333333333333333333333333333333
|
|
||||||
}
|
|
||||||
GroupIndex = 1
|
|
||||||
NumGlyphs = 2
|
|
||||||
OnClick = ButtonPieClick
|
|
||||||
ShowHint = True
|
|
||||||
ParentShowHint = False
|
|
||||||
end
|
|
||||||
object ButtonMarkers: TSpeedButton
|
|
||||||
Left = 291
|
|
||||||
Height = 25
|
|
||||||
Hint = 'Show Markers'
|
|
||||||
Top = 7
|
|
||||||
Width = 25
|
|
||||||
Enabled = False
|
|
||||||
Flat = True
|
|
||||||
Glyph.Data = {
|
|
||||||
76010000424D7601000000000000760000002800000020000000100000000100
|
|
||||||
0400000000000001000000000000000000001000000000000000000000000000
|
|
||||||
80000080000000808000800000008000800080800000C0C0C000808080000000
|
|
||||||
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00338333833383
|
|
||||||
3383338F3F8F3F8F3F8F33838383838383833F8F8F8F8F8F8F8F880000000000
|
|
||||||
000088888888888888883303333333333333338F33333333333338033393A333
|
|
||||||
333A388833333333333333033C333C3333333F8FFFFFFFFFFFFF88088888988C
|
|
||||||
888A88888888888888883303333333333333338F333333333333380A33A33333
|
|
||||||
3333388833333333333333033333333A33333F8FFFFFFFFFFFFF880888888898
|
|
||||||
889888888888888888883303933C33333333338F333333333333380333333333
|
|
||||||
3A33388F3333333333333303C333333333333F8FFFFFFFFFFFFF880888888888
|
|
||||||
8888888888888888888833333333333333333333333333333333
|
|
||||||
}
|
|
||||||
GroupIndex = 1
|
|
||||||
NumGlyphs = 2
|
|
||||||
OnClick = ButtonMarkersClick
|
|
||||||
ShowHint = True
|
|
||||||
ParentShowHint = False
|
|
||||||
end
|
|
||||||
object ButtonDeltaAverage: TSpeedButton
|
|
||||||
Left = 319
|
|
||||||
Height = 25
|
|
||||||
Hint = 'Delta Average'
|
|
||||||
Top = 7
|
|
||||||
Width = 25
|
|
||||||
Enabled = False
|
|
||||||
Flat = True
|
|
||||||
Glyph.Data = {
|
|
||||||
76010000424D7601000000000000760000002800000020000000100000000100
|
|
||||||
0400000000000001000000000000000000001000000000000000000000000000
|
|
||||||
80000080000000808000800000008000800080800000C0C0C000808080000000
|
|
||||||
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00333300030003
|
|
||||||
0003333388838883888333333333333333333FFFFFFFFFFFFFFF888000000000
|
|
||||||
0000888888888888888833333333033333333333333F33333333333333330333
|
|
||||||
33333333333F3333333333CCCCCC033333333333333F3333333388CCCCCC0333
|
|
||||||
33333333333F3333333333333333033333333333333F33333333333333330AAA
|
|
||||||
A3333333333F33333333333333330AAAA3333333333F33333333833333330333
|
|
||||||
33333333333F3333333333333333099999993333333F33333333333333330999
|
|
||||||
99993333333F3333333333333333033333333FFFFFFFFFFFFFFF888000000000
|
|
||||||
0000888888888888888833333333333333333333333333333333
|
|
||||||
}
|
|
||||||
GroupIndex = 1
|
|
||||||
NumGlyphs = 2
|
|
||||||
OnClick = ButtonDeltaAverageClick
|
|
||||||
ShowHint = True
|
|
||||||
ParentShowHint = False
|
|
||||||
end
|
|
||||||
object ButtonLineMarker: TSpeedButton
|
|
||||||
Left = 84
|
|
||||||
Height = 25
|
|
||||||
Hint = 'Line with Markers'
|
|
||||||
Top = 5
|
|
||||||
Width = 25
|
|
||||||
Flat = True
|
|
||||||
Glyph.Data = {
|
|
||||||
76010000424D7601000000000000760000002800000020000000100000000100
|
|
||||||
04000000000000010000120B0000120B00001000000000000000000000000000
|
|
||||||
800000800000008080008000000080008000808000007F7F7F00BFBFBF000000
|
|
||||||
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00337333733373
|
|
||||||
3373337F3F7F3F7F3F7F33737373737373733F7F7F7F7F7F7F7F770000000000
|
|
||||||
000077777777777777773303333333333333337FF333333F33333709333333C3
|
|
||||||
333337773F3FF373F333330393993C3C33333F7F7F77F7F7FFFF77079797977C
|
|
||||||
77777777777777777777330339339333C333337FF73373F37F33370C333C3933
|
|
||||||
933337773F3737F37FF33303C3C33939C9333F7F7F7FF7F777FF7707C7C79797
|
|
||||||
7C97777777777777777733033C3393933C33337F37F33333373F37033C333933
|
|
||||||
33C3377F3733333333733303CCC3393333C33F7FFFFFFFFFFFFF77077C777777
|
|
||||||
7CCC777777777777777733333333333333C33333333333333333
|
|
||||||
}
|
|
||||||
GroupIndex = 1
|
|
||||||
NumGlyphs = 2
|
|
||||||
OnClick = ButtonLineMarkerClick
|
|
||||||
ShowHint = True
|
|
||||||
ParentShowHint = False
|
|
||||||
end
|
|
||||||
object Label1: TLabel
|
|
||||||
Left = 398
|
|
||||||
Height = 16
|
|
||||||
Top = 10
|
|
||||||
Width = 210
|
|
||||||
Caption = '(TODO: Fix broken chart types)'
|
|
||||||
Enabled = False
|
|
||||||
ParentColor = False
|
|
||||||
end
|
|
||||||
object SpeedButtonTestMouseOver: TSpeedButton
|
|
||||||
Left = 139
|
|
||||||
Height = 25
|
|
||||||
Hint = 'Floating Markers Demo (new JAN 2005!)'
|
|
||||||
Top = 5
|
|
||||||
Width = 26
|
|
||||||
Flat = True
|
|
||||||
Glyph.Data = {
|
|
||||||
F6000000424DF600000000000000760000002800000010000000100000000100
|
|
||||||
0400000000008000000000000000000000001000000000000000000000000000
|
|
||||||
8000008000000080800080000000800080008080000080808000C0C0C0000000
|
|
||||||
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00D88888888888
|
|
||||||
888D79FFFFFFFFFFFF98999FFFFFFFFFF99979CFFFFFFFFFCF987FFCFFFFFFFF
|
|
||||||
CFF87FFCFFFFFFFCFFF87FFCFFFFFFFCFFF87FFFCFFFFFCFFFF87FFFCFFFFFCF
|
|
||||||
FFF87FFFCFFFFFCFFFF87FFFFCFFFCFFFFF87FFFFCFFFCFFFFF87FFFFFCFFCFF
|
|
||||||
FFF87FFFFFC9CFFFFFF87FFFFF999FFFFFF8D77777797777777D
|
|
||||||
}
|
|
||||||
GroupIndex = 1
|
|
||||||
OnClick = SpeedButtonTestMouseOverClick
|
|
||||||
ShowHint = True
|
|
||||||
ParentShowHint = False
|
|
||||||
end
|
|
||||||
object SpinEdit1: TSpinEdit
|
|
||||||
Left = 656
|
|
||||||
Height = 24
|
|
||||||
Top = 6
|
|
||||||
Width = 66
|
|
||||||
MaxValue = 1000
|
|
||||||
OnChange = SpinEdit1Change
|
|
||||||
TabOrder = 0
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object ListBox1: TListBox
|
|
||||||
Left = 0
|
|
||||||
Height = 398
|
|
||||||
Top = 35
|
|
||||||
Width = 159
|
|
||||||
Align = alLeft
|
|
||||||
Color = clBtnFace
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -11
|
|
||||||
Font.Name = 'Courier New'
|
|
||||||
Items.Strings = (
|
|
||||||
'<Pen Values>'
|
|
||||||
)
|
|
||||||
ItemHeight = 14
|
|
||||||
OnClick = ListBox1Click
|
|
||||||
OnDblClick = ListBox1DblClick
|
|
||||||
ParentFont = False
|
|
||||||
TabOrder = 1
|
|
||||||
Visible = False
|
|
||||||
end
|
|
||||||
object ColorDialog1: TColorDialog
|
|
||||||
Color = clBlack
|
|
||||||
CustomColors.Strings = (
|
|
||||||
'ColorA=000000'
|
|
||||||
'ColorB=000080'
|
|
||||||
'ColorC=008000'
|
|
||||||
'ColorD=008080'
|
|
||||||
'ColorE=800000'
|
|
||||||
'ColorF=800080'
|
|
||||||
'ColorG=808000'
|
|
||||||
'ColorH=808080'
|
|
||||||
'ColorI=C0C0C0'
|
|
||||||
'ColorJ=0000FF'
|
|
||||||
'ColorK=00FF00'
|
|
||||||
'ColorL=00FFFF'
|
|
||||||
'ColorM=FF0000'
|
|
||||||
'ColorN=FF00FF'
|
|
||||||
'ColorO=FFFF00'
|
|
||||||
'ColorP=FFFFFF'
|
|
||||||
'ColorQ=C0DCC0'
|
|
||||||
'ColorR=F0CAA6'
|
|
||||||
'ColorS=F0FBFF'
|
|
||||||
'ColorT=A4A0A0'
|
|
||||||
)
|
|
||||||
left = 504
|
|
||||||
top = 160
|
|
||||||
end
|
|
||||||
object FontDialog1: TFontDialog
|
|
||||||
Font.Color = clWindowText
|
|
||||||
Font.Height = -13
|
|
||||||
Font.Name = 'System'
|
|
||||||
MinFontSize = 0
|
|
||||||
MaxFontSize = 0
|
|
||||||
Options = []
|
|
||||||
left = 592
|
|
||||||
top = 160
|
|
||||||
end
|
|
||||||
object MainMenu1: TMainMenu
|
|
||||||
left = 464
|
|
||||||
top = 48
|
|
||||||
object Demo1: TMenuItem
|
|
||||||
Caption = '&Demo'
|
|
||||||
object MenuItem2: TMenuItem
|
|
||||||
Caption = '-'
|
|
||||||
end
|
|
||||||
object mnuSetTitle: TMenuItem
|
|
||||||
Caption = 'Set Title...'
|
|
||||||
OnClick = mnuSetTitleClick
|
|
||||||
end
|
|
||||||
object mnuSetXAxisHeader: TMenuItem
|
|
||||||
Caption = 'Set X Axis Header...'
|
|
||||||
OnClick = mnuSetXAxisHeaderClick
|
|
||||||
end
|
|
||||||
object mnuSetYAxisHeader: TMenuItem
|
|
||||||
Caption = 'Set Y Axis Header...'
|
|
||||||
OnClick = mnuSetYAxisHeaderClick
|
|
||||||
end
|
|
||||||
object MenuItem3: TMenuItem
|
|
||||||
Caption = '-'
|
|
||||||
end
|
|
||||||
object mnuFonts: TMenuItem
|
|
||||||
Caption = 'Fonts'
|
|
||||||
object mnuSetHeaderFont: TMenuItem
|
|
||||||
Caption = 'Set Header Font...'
|
|
||||||
OnClick = mnuSetHeaderFontClick
|
|
||||||
end
|
|
||||||
object mnuSetAxisTitlefont: TMenuItem
|
|
||||||
Caption = 'Set Axis Title Font...'
|
|
||||||
OnClick = mnuSetAxisTitlefontClick
|
|
||||||
end
|
|
||||||
object mnuSetAxisFont: TMenuItem
|
|
||||||
Caption = 'Set Axis Label Font...'
|
|
||||||
OnClick = mnuSetAxisFontClick
|
|
||||||
end
|
|
||||||
object mnuSetLegendFont: TMenuItem
|
|
||||||
Caption = 'Set Legend Font...'
|
|
||||||
OnClick = mnuSetLegendFontClick
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object mnuColors: TMenuItem
|
|
||||||
Caption = 'Colors'
|
|
||||||
object mnuSetPaperColor: TMenuItem
|
|
||||||
Caption = 'Set Paper Color...'
|
|
||||||
OnClick = mnuSetPaperColorClick
|
|
||||||
end
|
|
||||||
object mnuSetDivisionLineColor: TMenuItem
|
|
||||||
Caption = 'Set Division Line Color...'
|
|
||||||
OnClick = mnuSetDivisionLineColorClick
|
|
||||||
end
|
|
||||||
object mnuSetShadowColor: TMenuItem
|
|
||||||
Caption = 'Set Shadow Color..'
|
|
||||||
OnClick = mnuSetShadowColorClick
|
|
||||||
end
|
|
||||||
object mnuSetCursorColor: TMenuItem
|
|
||||||
Caption = 'Set Cursor Color...'
|
|
||||||
OnClick = mnuSetCursorColorClick
|
|
||||||
end
|
|
||||||
object mnuSetHintColor: TMenuItem
|
|
||||||
Caption = 'Set Hint Color...'
|
|
||||||
OnClick = mnuSetHintColorClick
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object mnuSetLineWidths: TMenuItem
|
|
||||||
Caption = 'Line Widths'
|
|
||||||
object mnuSetAxisLineWidth: TMenuItem
|
|
||||||
Caption = 'Set Axis Line Width...'
|
|
||||||
OnClick = mnuSetAxisLineWidthClick
|
|
||||||
end
|
|
||||||
object mnuSetPenLineWidth: TMenuItem
|
|
||||||
Caption = 'Set Pen Line Width...'
|
|
||||||
OnClick = mnuSetPenLineWidthClick
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object mnuPens: TMenuItem
|
|
||||||
Caption = 'Pens...'
|
|
||||||
OnClick = mnuPensClick
|
|
||||||
end
|
|
||||||
object mnuSetMarkerSize: TMenuItem
|
|
||||||
Caption = 'Marker Size...'
|
|
||||||
OnClick = mnuSetMarkerSizeClick
|
|
||||||
end
|
|
||||||
object mnuFillUnderLine: TMenuItem
|
|
||||||
Caption = 'Fill under line'
|
|
||||||
OnClick = mnuFillUnderLineClick
|
|
||||||
end
|
|
||||||
object mnuLegend: TMenuItem
|
|
||||||
Caption = 'Legend'
|
|
||||||
object mnuLegendNone: TMenuItem
|
|
||||||
Caption = 'None'
|
|
||||||
GroupIndex = 113
|
|
||||||
OnClick = mnuLegenClick
|
|
||||||
end
|
|
||||||
object mnuLegendRight: TMenuItem
|
|
||||||
Caption = 'Right'
|
|
||||||
GroupIndex = 113
|
|
||||||
OnClick = mnuLegenClick
|
|
||||||
end
|
|
||||||
object mnuLegendBelow: TMenuItem
|
|
||||||
Caption = 'Below'
|
|
||||||
Checked = True
|
|
||||||
GroupIndex = 113
|
|
||||||
OnClick = mnuLegenClick
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object mnuSetXStartOffset: TMenuItem
|
|
||||||
Caption = 'X Start Offset...'
|
|
||||||
OnClick = mnuSetXStartOffsetClick
|
|
||||||
end
|
|
||||||
object N2: TMenuItem
|
|
||||||
Caption = '-'
|
|
||||||
end
|
|
||||||
object mnuScrolling: TMenuItem
|
|
||||||
Caption = 'Scrolling'
|
|
||||||
ShortCut = 16467
|
|
||||||
OnClick = mnuScrollingClick
|
|
||||||
end
|
|
||||||
object CopyToClipboard1: TMenuItem
|
|
||||||
Caption = 'Copy To Clipboard'
|
|
||||||
ShortCut = 16451
|
|
||||||
OnClick = CopyToClipboard1Click
|
|
||||||
end
|
|
||||||
object Print1: TMenuItem
|
|
||||||
Caption = 'Print Chart to Printer'
|
|
||||||
ShortCut = 16464
|
|
||||||
OnClick = Print1Click
|
|
||||||
end
|
|
||||||
object PrintOptions1: TMenuItem
|
|
||||||
Caption = '&Print Options'
|
|
||||||
OnClick = PrintOptions1Click
|
|
||||||
end
|
|
||||||
object N1: TMenuItem
|
|
||||||
Caption = '-'
|
|
||||||
end
|
|
||||||
object Generatenewrandomvalues1: TMenuItem
|
|
||||||
Caption = '&Generate new random values'
|
|
||||||
ShortCut = 16466
|
|
||||||
OnClick = Generatenewrandomvalues1Click
|
|
||||||
end
|
|
||||||
object ShowgapinLineChart1: TMenuItem
|
|
||||||
Caption = '&Show gap in Line Chart'
|
|
||||||
ShortCut = 16455
|
|
||||||
OnClick = ShowgapinLineChart1Click
|
|
||||||
end
|
|
||||||
object mnuDateTimeAxisMode: TMenuItem
|
|
||||||
Caption = 'Date/Time Axis Mode'
|
|
||||||
OnClick = mnuDateTimeAxisModeClick
|
|
||||||
end
|
|
||||||
object MenuNegValueTest: TMenuItem
|
|
||||||
AutoCheck = True
|
|
||||||
Caption = 'Use Positive and Negative Demo Values (-20..+20)'
|
|
||||||
OnClick = MenuNegValueTestClick
|
|
||||||
end
|
|
||||||
object mnuSecondaryAxisMode: TMenuItem
|
|
||||||
Caption = '&Plot Markers+Values using Alternate Scale (0-120%)'
|
|
||||||
OnClick = mnuSecondaryAxisModeClick
|
|
||||||
end
|
|
||||||
object N4: TMenuItem
|
|
||||||
Caption = '-'
|
|
||||||
end
|
|
||||||
object ShowDataInListbox1: TMenuItem
|
|
||||||
Caption = '&Show Data in listbox'
|
|
||||||
ShortCut = 16452
|
|
||||||
OnClick = ShowDataInListbox1Click
|
|
||||||
end
|
|
||||||
object LargeDataset576samples1: TMenuItem
|
|
||||||
Caption = '&Large Dataset (576 samples)'
|
|
||||||
ShortCut = 16460
|
|
||||||
OnClick = LargeDataset576samples1Click
|
|
||||||
end
|
|
||||||
object NewFeaturesfor20071: TMenuItem
|
|
||||||
Caption = 'New Features for 2007'
|
|
||||||
OnClick = NewFeaturesfor20071Click
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object Help1: TMenuItem
|
|
||||||
Caption = '&Help'
|
|
||||||
object About1: TMenuItem
|
|
||||||
Caption = '&About JvChart Component'
|
|
||||||
ShortCut = 16449
|
|
||||||
OnClick = About1Click
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object Timer1: TTimer
|
|
||||||
Enabled = False
|
|
||||||
Interval = 100
|
|
||||||
OnTimer = Timer1Timer
|
|
||||||
left = 344
|
|
||||||
top = 48
|
|
||||||
end
|
|
||||||
object PrinterSetupDialog1: TPrinterSetupDialog
|
|
||||||
left = 264
|
|
||||||
top = 160
|
|
||||||
end
|
|
||||||
object PrintDialog1: TPrintDialog
|
|
||||||
left = 392
|
|
||||||
top = 160
|
|
||||||
end
|
|
||||||
end
|
|
File diff suppressed because it is too large
Load Diff
@ -1,206 +0,0 @@
|
|||||||
object PenEditorForm: TPenEditorForm
|
|
||||||
Left = 347
|
|
||||||
Height = 302
|
|
||||||
Top = 128
|
|
||||||
Width = 505
|
|
||||||
BorderStyle = bsDialog
|
|
||||||
Caption = 'PenEditorForm'
|
|
||||||
ClientHeight = 302
|
|
||||||
ClientWidth = 505
|
|
||||||
OnCreate = FormCreate
|
|
||||||
OnDestroy = FormDestroy
|
|
||||||
Position = poScreenCenter
|
|
||||||
LCLVersion = '2.1.0.0'
|
|
||||||
object btnPenColor: TButton
|
|
||||||
Left = 232
|
|
||||||
Height = 25
|
|
||||||
Top = 232
|
|
||||||
Width = 64
|
|
||||||
AutoSize = True
|
|
||||||
Caption = 'Color...'
|
|
||||||
OnClick = btnPenColorClick
|
|
||||||
TabOrder = 0
|
|
||||||
end
|
|
||||||
object rgPenStyle: TRadioGroup
|
|
||||||
Left = 224
|
|
||||||
Height = 168
|
|
||||||
Top = 40
|
|
||||||
Width = 121
|
|
||||||
AutoFill = True
|
|
||||||
Caption = 'Style'
|
|
||||||
ChildSizing.LeftRightSpacing = 6
|
|
||||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
|
||||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
|
||||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
|
||||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
|
||||||
ChildSizing.ControlsPerLine = 1
|
|
||||||
ClientHeight = 148
|
|
||||||
ClientWidth = 117
|
|
||||||
Items.Strings = (
|
|
||||||
'Solid'
|
|
||||||
'Dash'
|
|
||||||
'Dot'
|
|
||||||
'Dash-dot'
|
|
||||||
'Dash-dot-dot'
|
|
||||||
'Clear'
|
|
||||||
)
|
|
||||||
OnClick = rgPenStyleClick
|
|
||||||
TabOrder = 1
|
|
||||||
end
|
|
||||||
object ButtonPanel1: TButtonPanel
|
|
||||||
Left = 6
|
|
||||||
Height = 34
|
|
||||||
Top = 262
|
|
||||||
Width = 493
|
|
||||||
OKButton.Name = 'OKButton'
|
|
||||||
OKButton.DefaultCaption = True
|
|
||||||
HelpButton.Name = 'HelpButton'
|
|
||||||
HelpButton.DefaultCaption = True
|
|
||||||
CloseButton.Name = 'CloseButton'
|
|
||||||
CloseButton.DefaultCaption = True
|
|
||||||
CancelButton.Name = 'CancelButton'
|
|
||||||
CancelButton.DefaultCaption = True
|
|
||||||
TabOrder = 2
|
|
||||||
ShowButtons = [pbOK, pbCancel]
|
|
||||||
end
|
|
||||||
object lbPens: TListBox
|
|
||||||
Left = 8
|
|
||||||
Height = 216
|
|
||||||
Top = 8
|
|
||||||
Width = 200
|
|
||||||
ItemHeight = 0
|
|
||||||
OnDrawItem = lbPensDrawItem
|
|
||||||
OnSelectionChange = lbPensSelectionChange
|
|
||||||
Style = lbOwnerDrawFixed
|
|
||||||
TabOrder = 3
|
|
||||||
end
|
|
||||||
object btnAdd: TButton
|
|
||||||
Left = 11
|
|
||||||
Height = 25
|
|
||||||
Top = 232
|
|
||||||
Width = 48
|
|
||||||
AutoSize = True
|
|
||||||
Caption = 'Add'
|
|
||||||
OnClick = btnAddClick
|
|
||||||
TabOrder = 4
|
|
||||||
end
|
|
||||||
object btnDelete: TButton
|
|
||||||
Left = 64
|
|
||||||
Height = 25
|
|
||||||
Top = 232
|
|
||||||
Width = 59
|
|
||||||
AutoSize = True
|
|
||||||
Caption = 'Delete'
|
|
||||||
OnClick = btnDeleteClick
|
|
||||||
TabOrder = 5
|
|
||||||
end
|
|
||||||
object edPenLegend: TEdit
|
|
||||||
Left = 304
|
|
||||||
Height = 23
|
|
||||||
Top = 8
|
|
||||||
Width = 185
|
|
||||||
OnEditingDone = edPenLegendEditingDone
|
|
||||||
TabOrder = 6
|
|
||||||
end
|
|
||||||
object btnClear: TButton
|
|
||||||
Left = 128
|
|
||||||
Height = 25
|
|
||||||
Top = 232
|
|
||||||
Width = 53
|
|
||||||
AutoSize = True
|
|
||||||
Caption = 'Clear'
|
|
||||||
OnClick = btnClearClick
|
|
||||||
TabOrder = 7
|
|
||||||
end
|
|
||||||
object lblLegend: TLabel
|
|
||||||
Left = 224
|
|
||||||
Height = 15
|
|
||||||
Top = 8
|
|
||||||
Width = 39
|
|
||||||
Caption = 'Legend'
|
|
||||||
ParentColor = False
|
|
||||||
end
|
|
||||||
object ColorSample: TShape
|
|
||||||
Left = 304
|
|
||||||
Height = 25
|
|
||||||
Top = 232
|
|
||||||
Width = 25
|
|
||||||
end
|
|
||||||
object rgMarker: TRadioGroup
|
|
||||||
Left = 376
|
|
||||||
Height = 136
|
|
||||||
Top = 40
|
|
||||||
Width = 112
|
|
||||||
AutoFill = True
|
|
||||||
Caption = 'Marker'
|
|
||||||
ChildSizing.LeftRightSpacing = 6
|
|
||||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
|
||||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
|
||||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
|
||||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
|
||||||
ChildSizing.ControlsPerLine = 1
|
|
||||||
ClientHeight = 116
|
|
||||||
ClientWidth = 108
|
|
||||||
Items.Strings = (
|
|
||||||
'None'
|
|
||||||
'Diamond'
|
|
||||||
'Circle'
|
|
||||||
'Square'
|
|
||||||
'Cross'
|
|
||||||
)
|
|
||||||
OnClick = rgMarkerClick
|
|
||||||
TabOrder = 8
|
|
||||||
end
|
|
||||||
object rgAxis: TRadioGroup
|
|
||||||
Left = 376
|
|
||||||
Height = 64
|
|
||||||
Top = 192
|
|
||||||
Width = 113
|
|
||||||
AutoFill = True
|
|
||||||
Caption = 'y Axis'
|
|
||||||
ChildSizing.LeftRightSpacing = 6
|
|
||||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
|
||||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
|
||||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
|
||||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
|
||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
|
||||||
ChildSizing.ControlsPerLine = 1
|
|
||||||
ClientHeight = 44
|
|
||||||
ClientWidth = 109
|
|
||||||
Items.Strings = (
|
|
||||||
'Primary'
|
|
||||||
'Secondary'
|
|
||||||
)
|
|
||||||
OnClick = rgAxisClick
|
|
||||||
TabOrder = 9
|
|
||||||
end
|
|
||||||
object ColorDialog: TColorDialog
|
|
||||||
Color = clBlack
|
|
||||||
CustomColors.Strings = (
|
|
||||||
'ColorA=000000'
|
|
||||||
'ColorB=000080'
|
|
||||||
'ColorC=008000'
|
|
||||||
'ColorD=008080'
|
|
||||||
'ColorE=800000'
|
|
||||||
'ColorF=800080'
|
|
||||||
'ColorG=808000'
|
|
||||||
'ColorH=808080'
|
|
||||||
'ColorI=C0C0C0'
|
|
||||||
'ColorJ=0000FF'
|
|
||||||
'ColorK=00FF00'
|
|
||||||
'ColorL=00FFFF'
|
|
||||||
'ColorM=FF0000'
|
|
||||||
'ColorN=FF00FF'
|
|
||||||
'ColorO=FFFF00'
|
|
||||||
'ColorP=FFFFFF'
|
|
||||||
'ColorQ=C0DCC0'
|
|
||||||
'ColorR=F0CAA6'
|
|
||||||
'ColorS=F0FBFF'
|
|
||||||
'ColorT=A4A0A0'
|
|
||||||
)
|
|
||||||
left = 144
|
|
||||||
top = 88
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,349 +0,0 @@
|
|||||||
unit jvPenEditor;
|
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
|
||||||
|
|
||||||
interface
|
|
||||||
|
|
||||||
uses
|
|
||||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls,
|
|
||||||
ButtonPanel, Contnrs, Types,
|
|
||||||
JvChart;
|
|
||||||
|
|
||||||
type
|
|
||||||
TPenObj = class
|
|
||||||
Legend: String;
|
|
||||||
Color: TColor;
|
|
||||||
Style: TPenStyle;
|
|
||||||
Marker: TJvChartPenMarkerKind;
|
|
||||||
SecondaryAxis: Boolean;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TPenEditorForm }
|
|
||||||
|
|
||||||
TPenEditorForm = class(TForm)
|
|
||||||
btnPenColor: TButton;
|
|
||||||
btnAdd: TButton;
|
|
||||||
btnDelete: TButton;
|
|
||||||
btnClear: TButton;
|
|
||||||
ButtonPanel1: TButtonPanel;
|
|
||||||
ColorDialog: TColorDialog;
|
|
||||||
edPenLegend: TEdit;
|
|
||||||
lblLegend: TLabel;
|
|
||||||
lbPens: TListBox;
|
|
||||||
rgAxis: TRadioGroup;
|
|
||||||
rgMarker: TRadioGroup;
|
|
||||||
rgPenStyle: TRadioGroup;
|
|
||||||
ColorSample: TShape;
|
|
||||||
procedure btnAddClick(Sender: TObject);
|
|
||||||
procedure btnClearClick(Sender: TObject);
|
|
||||||
procedure btnDeleteClick(Sender: TObject);
|
|
||||||
procedure btnPenColorClick(Sender: TObject);
|
|
||||||
procedure edPenLegendEditingDone(Sender: TObject);
|
|
||||||
procedure FormCreate(Sender: TObject);
|
|
||||||
procedure FormDestroy(Sender: TObject);
|
|
||||||
procedure lbPensDrawItem(Control: TWinControl; Index: Integer;
|
|
||||||
ARect: TRect; State: TOwnerDrawState);
|
|
||||||
procedure lbPensSelectionChange(Sender: TObject; User: boolean);
|
|
||||||
procedure rgAxisClick(Sender: TObject);
|
|
||||||
procedure rgMarkerClick(Sender: TObject);
|
|
||||||
procedure rgPenStyleClick(Sender: TObject);
|
|
||||||
private
|
|
||||||
FPens: TObjectList;
|
|
||||||
procedure ControlsToPen(AIndex: Integer);
|
|
||||||
procedure PenToControls(AIndex: Integer);
|
|
||||||
function GetCurrentPen: TPenObj;
|
|
||||||
|
|
||||||
public
|
|
||||||
procedure ApplyToChart(AChart: TJvChart);
|
|
||||||
procedure UseChart(AChart: TJvChart);
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
implementation
|
|
||||||
|
|
||||||
{$R *.lfm}
|
|
||||||
|
|
||||||
uses
|
|
||||||
Math, LCLType;
|
|
||||||
|
|
||||||
|
|
||||||
{ TPenEditorForm }
|
|
||||||
|
|
||||||
procedure TPenEditorForm.ApplyToChart(AChart: TJvChart);
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
pen: TPenObj;
|
|
||||||
begin
|
|
||||||
Assert(AChart <> nil);
|
|
||||||
AChart.Options.PenCount := FPens.Count;
|
|
||||||
AChart.Options.PenLegends.Clear;
|
|
||||||
for i := 0 to FPens.Count - 1 do
|
|
||||||
begin
|
|
||||||
pen := TPenObj(FPens[i]);
|
|
||||||
AChart.Options.PenLegends.Add(pen.Legend);
|
|
||||||
AChart.Options.PenColor[i] := pen.Color;
|
|
||||||
AChart.Options.PenStyle[i] := pen.Style;
|
|
||||||
AChart.Options.PenMarkerKind[i] := pen.Marker;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPenEditorForm.btnAddClick(Sender: TObject);
|
|
||||||
var
|
|
||||||
pen: TPenObj;
|
|
||||||
begin
|
|
||||||
pen := TPenObj.Create;
|
|
||||||
pen.Legend := '';
|
|
||||||
pen.Style := psSolid;
|
|
||||||
pen.Color := clBlack;
|
|
||||||
pen.Marker := pmkNone;
|
|
||||||
pen.SecondaryAxis := false;
|
|
||||||
FPens.Add(pen);
|
|
||||||
lbPens.Items.Add('');
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPenEditorForm.btnClearClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
FPens.Clear;
|
|
||||||
lbPens.Items.Clear;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPenEditorForm.btnDeleteClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
if lbPens.ItemIndex = -1 then
|
|
||||||
exit;
|
|
||||||
FPens.Delete(lbPens.ItemIndex);
|
|
||||||
lbPens.Items.Delete(lbPens.ItemIndex);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPenEditorForm.btnPenColorClick(Sender: TObject);
|
|
||||||
var
|
|
||||||
pen: TPenObj;
|
|
||||||
begin
|
|
||||||
pen := GetCurrentPen;
|
|
||||||
if pen = nil then
|
|
||||||
exit;
|
|
||||||
|
|
||||||
ColorDialog.Color := pen.Color;
|
|
||||||
if ColorDialog.Execute then begin
|
|
||||||
pen.Color := ColorDialog.Color;
|
|
||||||
lbPens.Invalidate;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPenEditorForm.ControlsToPen(AIndex: Integer);
|
|
||||||
var
|
|
||||||
pen: TPenObj;
|
|
||||||
begin
|
|
||||||
if AIndex = -1 then
|
|
||||||
exit;
|
|
||||||
pen := TPenObj(FPens[AIndex]);
|
|
||||||
pen.Legend := edPenLegend.Text;
|
|
||||||
if rgPenStyle.ItemIndex = rgPenStyle.Items.Count-1 then
|
|
||||||
pen.Style := psClear
|
|
||||||
else
|
|
||||||
pen.Style := TPenStyle(rgPenStyle.ItemIndex);
|
|
||||||
pen.Marker := TJvChartPenMarkerKind(rgMarker.ItemIndex);
|
|
||||||
pen.Color := ColorSample.Brush.Color;
|
|
||||||
pen.SecondaryAxis := rgAxis.ItemIndex = 1;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPenEditorForm.edPenLegendEditingDone(Sender: TObject);
|
|
||||||
var
|
|
||||||
pen: TPenObj;
|
|
||||||
begin
|
|
||||||
pen := GetCurrentPen;
|
|
||||||
if pen = nil then
|
|
||||||
exit;
|
|
||||||
pen.Legend := edPenLegend.Text;
|
|
||||||
lbPens.Invalidate;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPenEditorForm.FormCreate(Sender: TObject);
|
|
||||||
begin
|
|
||||||
FPens := TObjectList.Create;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPenEditorForm.FormDestroy(Sender: TObject);
|
|
||||||
begin
|
|
||||||
FPens.Free;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TPenEditorForm.GetCurrentPen: TPenObj;
|
|
||||||
begin
|
|
||||||
if lbPens.ItemIndex = -1 then
|
|
||||||
Result := nil
|
|
||||||
else
|
|
||||||
Result := TPenObj(FPens[lbPens.ItemIndex]);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPenEditorForm.lbPensDrawItem(Control: TWinControl; Index: Integer;
|
|
||||||
ARect: TRect; State: TOwnerDrawState);
|
|
||||||
var
|
|
||||||
R: TRect;
|
|
||||||
pen: TPenObj;
|
|
||||||
x, y, dx, dy: Integer;
|
|
||||||
begin
|
|
||||||
pen := TPenObj(FPens[Index]);
|
|
||||||
lbPens.Canvas.Font.Assign(lbPens.Font);
|
|
||||||
|
|
||||||
// Background
|
|
||||||
if [odSelected, odFocused] * State <> [] then
|
|
||||||
begin
|
|
||||||
lbPens.Canvas.Brush.Color := clHighlight;
|
|
||||||
lbPens.Canvas.Font.Color := clHighlightText;
|
|
||||||
end else
|
|
||||||
begin
|
|
||||||
lbPens.Canvas.Brush.Color := lbPens.Color;
|
|
||||||
lbPens.Canvas.Font.Color := lbPens.Font.Color;
|
|
||||||
end;
|
|
||||||
lbPens.Canvas.FillRect(ARect);
|
|
||||||
|
|
||||||
// Line
|
|
||||||
R := ARect;
|
|
||||||
R.Right := R.Left + 50;
|
|
||||||
InflateRect(R, -2, -2);
|
|
||||||
lbPens.Canvas.Pen.Style := pen.Style;
|
|
||||||
lbPens.Canvas.Pen.Color := pen.Color;
|
|
||||||
lbPens.Canvas.Line(R.Left, (R.Top + R.Bottom) div 2, R.Right, (R.Top + R.Bottom) div 2);
|
|
||||||
|
|
||||||
// Marker
|
|
||||||
x := (R.Left + R.Right) div 2;
|
|
||||||
y := (R.Top + R.Bottom) div 2;
|
|
||||||
dx := (R.Bottom - R.Top) div 2;
|
|
||||||
dy := dx;
|
|
||||||
lbPens.Canvas.Pen.Style := psSolid;
|
|
||||||
case pen.Marker of
|
|
||||||
pmkNone: ;
|
|
||||||
pmkDiamond:
|
|
||||||
begin
|
|
||||||
lbPens.Canvas.Brush.Color := pen.Color;
|
|
||||||
lbPens.Canvas.Brush.Style := bsSolid;
|
|
||||||
lbPens.Canvas.Polygon([Point(x, y-dy), Point(x-dx, y), Point(x, y+dy), Point(x+dx, y)]);
|
|
||||||
end;
|
|
||||||
pmkCircle:
|
|
||||||
begin
|
|
||||||
lbPens.Canvas.Brush.Style := bsClear;
|
|
||||||
lbPens.Canvas.Ellipse(x-dx, y-dy, x+dx, y+dy);
|
|
||||||
end;
|
|
||||||
pmkSquare:
|
|
||||||
begin
|
|
||||||
lbPens.Canvas.Brush.Style := bsClear;
|
|
||||||
lbPens.Canvas.Rectangle(x-dx, y-dy, x+dx, y+dy);
|
|
||||||
end;
|
|
||||||
pmkCross:
|
|
||||||
begin
|
|
||||||
lbPens.Canvas.Line(x-dx, y, x+dx, y);
|
|
||||||
lbPens.Canvas.Line(x, y-dy, x, y+dy);
|
|
||||||
end;
|
|
||||||
else
|
|
||||||
raise Exception.Create('Marker style not supported.');
|
|
||||||
end;
|
|
||||||
|
|
||||||
// Text
|
|
||||||
lbPens.Canvas.Brush.Style := bsClear;
|
|
||||||
lbPens.Canvas.TextOut(R.Right + 2, (R.Top + R.Bottom - lbPens.Canvas.TextHeight('Rg')) div 2, pen.Legend);
|
|
||||||
|
|
||||||
// Focus rect
|
|
||||||
if odFocused in State then
|
|
||||||
lbPens.Canvas.DrawFocusRect(ARect);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPenEditorForm.lbPensSelectionChange(Sender: TObject; User: boolean);
|
|
||||||
begin
|
|
||||||
PenToControls(lbPens.ItemIndex);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPenEditorForm.PenToControls(AIndex: Integer);
|
|
||||||
var
|
|
||||||
pen: TPenObj;
|
|
||||||
begin
|
|
||||||
if AIndex = -1 then
|
|
||||||
exit;
|
|
||||||
|
|
||||||
pen := TPenObj(FPens[AIndex]);
|
|
||||||
|
|
||||||
edPenLegend.Text := pen.Legend;
|
|
||||||
if pen.Style = psClear then
|
|
||||||
rgPenStyle.ItemIndex := rgPenStyle.Items.Count-1
|
|
||||||
else
|
|
||||||
rgPenStyle.ItemIndex := ord(pen.Style);
|
|
||||||
rgMarker.ItemIndex := ord(pen.Marker);
|
|
||||||
rgAxis.ItemIndex := IfThen(pen.SecondaryAxis, 1, 0);
|
|
||||||
ColorSample.Brush.Color := pen.Color;
|
|
||||||
|
|
||||||
edPenLegend.Enabled := true;
|
|
||||||
rgPenStyle.Enabled := true;
|
|
||||||
rgMarker.Enabled := true;
|
|
||||||
rgAxis.Enabled := true;
|
|
||||||
btnPenColor.Enabled := true;
|
|
||||||
ColorSample.Visible := true;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPenEditorForm.rgAxisClick(Sender: TObject);
|
|
||||||
var
|
|
||||||
pen: TPenObj;
|
|
||||||
begin
|
|
||||||
pen := GetCurrentPen;
|
|
||||||
if pen = nil then
|
|
||||||
exit;
|
|
||||||
pen.SecondaryAxis := rgAxis.ItemIndex = 1;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPenEditorForm.rgMarkerClick(Sender: TObject);
|
|
||||||
var
|
|
||||||
pen: TPenObj;
|
|
||||||
begin
|
|
||||||
pen := GetCurrentPen;
|
|
||||||
if pen = nil then
|
|
||||||
exit;
|
|
||||||
pen.Marker := TJvChartPenMarkerKind(rgMarker.ItemIndex);
|
|
||||||
lbPens.Invalidate;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPenEditorForm.rgPenStyleClick(Sender: TObject);
|
|
||||||
var
|
|
||||||
pen: TPenObj;
|
|
||||||
begin
|
|
||||||
pen := GetCurrentPen;
|
|
||||||
if pen = nil then
|
|
||||||
exit;
|
|
||||||
|
|
||||||
if rgPenStyle.itemIndex = rgPenStyle.Items.Count -1 then
|
|
||||||
pen.Style := psClear
|
|
||||||
else
|
|
||||||
pen.Style := TPenStyle(rgPenStyle.ItemIndex);
|
|
||||||
lbPens.Invalidate;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TPenEditorForm.UseChart(AChart: TJvChart);
|
|
||||||
var
|
|
||||||
i: Integer;
|
|
||||||
pen: TPenObj;
|
|
||||||
begin
|
|
||||||
Assert(AChart <> nil);
|
|
||||||
|
|
||||||
FPens.Clear;
|
|
||||||
lbPens.Items.Clear;
|
|
||||||
for i := 0 to AChart.Options.PenLegends.Count - 1 do
|
|
||||||
begin
|
|
||||||
pen := TPenObj.Create;
|
|
||||||
pen.Legend := AChart.Options.PenLegends[i];
|
|
||||||
pen.Color := AChart.Options.PenColor[i];
|
|
||||||
pen.Style := AChart.Options.PenStyle[i];
|
|
||||||
pen.Marker := AChart.Options.PenMarkerKind[i];
|
|
||||||
pen.SecondaryAxis := AChart.Options.PenSecondaryAxisFlag[i];;
|
|
||||||
FPens.Add(pen);
|
|
||||||
lbPens.Items.Add('');
|
|
||||||
end;
|
|
||||||
|
|
||||||
edPenLegend.Enabled := false;
|
|
||||||
rgPenStyle.Enabled := false;
|
|
||||||
rgMarker.Enabled := false;
|
|
||||||
rgAxis.Enabled := false;
|
|
||||||
btnPenColor.Enabled := false;
|
|
||||||
ColorSample.Visible := false;
|
|
||||||
end;
|
|
||||||
|
|
||||||
end.
|
|
||||||
|
|
@ -1,258 +0,0 @@
|
|||||||
{-----------------------------------------------------------------------------
|
|
||||||
The contents of this file are subject to the Mozilla Public License
|
|
||||||
Version 1.1 (the "License"); you may not use this file except in compliance
|
|
||||||
with the License. You may obtain a copy of the License at
|
|
||||||
http://www.mozilla.org/MPL/MPL-1.1.html
|
|
||||||
|
|
||||||
Software distributed under the License is distributed on an "AS IS" basis,
|
|
||||||
WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
|
|
||||||
the specific language governing rights and limitations under the License.
|
|
||||||
|
|
||||||
The Original Code is: JvChartDemoFm.Pas, released on 2002-10-04.
|
|
||||||
|
|
||||||
The Initial Developer of the Original Code is AABsoft and Mårten Henrichson.
|
|
||||||
(C) 1996 AABsoft and Mårten Henrichson.
|
|
||||||
All Rights Reserved.
|
|
||||||
|
|
||||||
Contributor(s): -
|
|
||||||
|
|
||||||
Last Modified: 2004-01-07
|
|
||||||
Modified 2003 Warren Postma
|
|
||||||
|
|
||||||
You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
|
|
||||||
located at http://jvcl.delphi-jedi.org
|
|
||||||
|
|
||||||
Description:
|
|
||||||
TStatArray - Statistics, Rolling average helper class.
|
|
||||||
|
|
||||||
Known Issues:
|
|
||||||
This version is part of JvChartDemo.
|
|
||||||
-----------------------------------------------------------------------------}
|
|
||||||
|
|
||||||
{$MODE OBJFPC}{$H+}
|
|
||||||
|
|
||||||
unit StatsClasses;
|
|
||||||
|
|
||||||
interface
|
|
||||||
|
|
||||||
type
|
|
||||||
|
|
||||||
TStatArray = class
|
|
||||||
protected
|
|
||||||
//FFirst:Boolean;
|
|
||||||
FGrows: Boolean; // false=rolling average (circular buffer mode), true=average or sd of any number of samples (array grows without limit)
|
|
||||||
FValues: Array of Double;
|
|
||||||
FLength: Integer; // Array absolute size (may still be no data even if this is >0)
|
|
||||||
FIndex: Integer; // Where will the next sample be stored into the array?
|
|
||||||
FCount: Integer; // How many valid samples are in the array right now?
|
|
||||||
procedure SetLen(aLength:Integer);
|
|
||||||
public
|
|
||||||
constructor Create; overload;
|
|
||||||
constructor Create(initialLength:Integer); overload;
|
|
||||||
destructor Destroy; override;
|
|
||||||
|
|
||||||
procedure AddValue(aValue:Double);
|
|
||||||
function Average:Double;
|
|
||||||
function StandardDeviation:Double;
|
|
||||||
|
|
||||||
property Grows:Boolean read FGrows write FGrows; // false=rolling average, true=average ALL samples (grows to fit)
|
|
||||||
property Length:Integer read FLength write SetLen;
|
|
||||||
property Count:Integer read FCount;
|
|
||||||
//property First:Boolean read FFirst;
|
|
||||||
procedure Reset; // Clear everything!
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
implementation
|
|
||||||
|
|
||||||
uses
|
|
||||||
SysUtils, // FloatToStr
|
|
||||||
Math; // VCL's statistics routines. StdDev, etc.
|
|
||||||
|
|
||||||
// Begin Rolling Average
|
|
||||||
|
|
||||||
constructor TStatArray.Create; // overload;
|
|
||||||
begin
|
|
||||||
//FFirst := true;
|
|
||||||
FLength := 0;
|
|
||||||
FIndex := 0;
|
|
||||||
FCount:= 0;
|
|
||||||
FGrows := true;
|
|
||||||
SetLength(FValues,0);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TStatArray.Reset;
|
|
||||||
var
|
|
||||||
i:Integer;
|
|
||||||
begin
|
|
||||||
FIndex := 0;
|
|
||||||
FCount := 0;
|
|
||||||
for i := 0 to FLength-1 do begin
|
|
||||||
FValues[i] := -999.0; // debug helper.
|
|
||||||
end;
|
|
||||||
//FFirst := true;
|
|
||||||
end;
|
|
||||||
|
|
||||||
constructor TStatArray.Create(initialLength:Integer); // overload;
|
|
||||||
begin
|
|
||||||
// FFirst := true;
|
|
||||||
SetLength(FValues,initialLength);
|
|
||||||
if (initialLength>0) then
|
|
||||||
FGrows := false
|
|
||||||
else
|
|
||||||
FGrows := true;
|
|
||||||
FLength := initialLength;
|
|
||||||
FIndex := 0;
|
|
||||||
FCount:= 0;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
destructor TStatArray.Destroy;
|
|
||||||
begin
|
|
||||||
SetLength(FValues,0);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
function TStatArray.Average:Double;
|
|
||||||
var
|
|
||||||
last,i:Integer;
|
|
||||||
sum:Double;
|
|
||||||
begin
|
|
||||||
if FCount <= 0 then begin
|
|
||||||
result := 0;
|
|
||||||
end else begin
|
|
||||||
sum := 0;
|
|
||||||
if (FCount>FLength) then
|
|
||||||
last :=FLength-1
|
|
||||||
else
|
|
||||||
last :=FCount-1;
|
|
||||||
for i := 0 to last do begin
|
|
||||||
sum := sum + FValues[i];
|
|
||||||
end;
|
|
||||||
result := sum / (last+1);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TStatArray.StandardDeviation:Double;
|
|
||||||
var
|
|
||||||
i:Integer;
|
|
||||||
// sum:Double;
|
|
||||||
TempArray:Array of Double;
|
|
||||||
begin
|
|
||||||
if (FCount <= 0) then
|
|
||||||
result := 0
|
|
||||||
else if (FCount >= FLength) then begin
|
|
||||||
result := Math.StdDev( FValues )
|
|
||||||
end else begin
|
|
||||||
SetLength(TempArray,FCount);
|
|
||||||
for i := 0 to FCount-1 do begin
|
|
||||||
TempArray[i] := FValues[i];
|
|
||||||
end;
|
|
||||||
result := Math.StdDev( TempArray );
|
|
||||||
SetLength(TempArray,0);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TStatArray.AddValue(aValue:Double);
|
|
||||||
//var
|
|
||||||
// i:Integer;
|
|
||||||
begin
|
|
||||||
(*if FFirst then begin
|
|
||||||
FFirst := false;
|
|
||||||
FIndex := 0;
|
|
||||||
FValues[0] := aValue;
|
|
||||||
FCount := 1;
|
|
||||||
end else begin*)
|
|
||||||
|
|
||||||
// First time in we might need to create an array:
|
|
||||||
if FIndex>=Length then begin
|
|
||||||
Assert(FGrows); // Illegal condition.
|
|
||||||
FLength := FIndex+1;
|
|
||||||
SetLength( FValues,FLength); // uninitialized, as of yet.
|
|
||||||
end;
|
|
||||||
|
|
||||||
FValues[FIndex] := aValue;
|
|
||||||
Inc(FIndex);
|
|
||||||
Inc(FCount);
|
|
||||||
if (not FGrows) then begin // circular?
|
|
||||||
if (FIndex>=FLength) then begin
|
|
||||||
FIndex := 0;
|
|
||||||
//FCount := FLength;//FCount does not exceed FLength in wraparounds.
|
|
||||||
end;
|
|
||||||
end else begin // grow after, in doublings of size, scales better!
|
|
||||||
if (FIndex>=FLength) then begin
|
|
||||||
FLength := FLength * 2;
|
|
||||||
SetLength( FValues,FLength); // uninitialized, as of yet.
|
|
||||||
{$ifdef DEBUG_ASSERTIONS}
|
|
||||||
Assert(FLength<20000); // Debug limit
|
|
||||||
{$endif}
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TStatArray.SetLen(aLength:Integer);
|
|
||||||
begin
|
|
||||||
if(aLength<1) then
|
|
||||||
aLength := 1;
|
|
||||||
FLength := aLength;
|
|
||||||
SetLength(FValues, FLength);
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
// End Stats
|
|
||||||
|
|
||||||
|
|
||||||
{$ifdef UNIT_TESTS}
|
|
||||||
procedure StatsUnitTests;
|
|
||||||
var
|
|
||||||
diff:Double;
|
|
||||||
a1:TStatArray;
|
|
||||||
procedure _outs(s:String);
|
|
||||||
begin
|
|
||||||
OutputDebugString(PChar(s));
|
|
||||||
end;
|
|
||||||
procedure _outd(d:Double);
|
|
||||||
begin
|
|
||||||
OutputDebugString(PChar(FloatToStr(d)));
|
|
||||||
end;
|
|
||||||
|
|
||||||
begin
|
|
||||||
_outs('StatsUnitTests begins');
|
|
||||||
|
|
||||||
a1 := TStatArray.Create(0); // Growing array.
|
|
||||||
a1.AddValue( 3.5 );
|
|
||||||
a1.AddValue( 1.5 );
|
|
||||||
a1.AddValue( 25.5 );
|
|
||||||
a1.AddValue( 100.5 );
|
|
||||||
_outd( a1.Average );
|
|
||||||
|
|
||||||
diff := Abs(((3.5+1.5+25.5+100.5)/4.0)-a1.Average);
|
|
||||||
Assert(diff<0.001);
|
|
||||||
|
|
||||||
a1.Reset;
|
|
||||||
Assert(Abs(a1.Average)<0.0001);
|
|
||||||
|
|
||||||
a1.AddValue( 3.5 );
|
|
||||||
a1.AddValue( 1.5 );
|
|
||||||
a1.AddValue( 25.5 );
|
|
||||||
a1.AddValue( 100.5 );
|
|
||||||
_outd( a1.Average );
|
|
||||||
|
|
||||||
diff := Abs(((3.5+1.5+25.5+100.5)/4.0)-a1.Average);
|
|
||||||
Assert(diff<0.001);
|
|
||||||
|
|
||||||
_outd( a1.StandardDeviation );
|
|
||||||
Assert(trunc(a1.StandardDeviation)=46);
|
|
||||||
|
|
||||||
_outs('StatsUnitTests ends');
|
|
||||||
end;
|
|
||||||
|
|
||||||
initialization
|
|
||||||
StatsUnitTests;
|
|
||||||
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
|
|
||||||
end.
|
|
@ -16,7 +16,7 @@
|
|||||||
TimeLine, OutlookBar, Thumbnail viewer, ImageViewer, ImageListViewer, OwnerDrawViewer"/>
|
TimeLine, OutlookBar, Thumbnail viewer, ImageViewer, ImageListViewer, OwnerDrawViewer"/>
|
||||||
<License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/>
|
<License Value="The JVCL is released in accordance with the MPL 1.1 license. To get your own copy or read it, go to http://www.mozilla.org/MPL/MPL-1.1.html. "/>
|
||||||
<Version Major="1" Release="6"/>
|
<Version Major="1" Release="6"/>
|
||||||
<Files Count="14">
|
<Files Count="13">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="..\run\JvCustomControls\jvtimeline.pas"/>
|
<Filename Value="..\run\JvCustomControls\jvtimeline.pas"/>
|
||||||
<UnitName Value="JvTimeLine"/>
|
<UnitName Value="JvTimeLine"/>
|
||||||
@ -69,10 +69,6 @@ TimeLine, OutlookBar, Thumbnail viewer, ImageViewer, ImageListViewer, OwnerDrawV
|
|||||||
<Filename Value="..\run\JvCustomControls\jvgammapanel.pas"/>
|
<Filename Value="..\run\JvCustomControls\jvgammapanel.pas"/>
|
||||||
<UnitName Value="JvGammaPanel"/>
|
<UnitName Value="JvGammaPanel"/>
|
||||||
</Item13>
|
</Item13>
|
||||||
<Item14>
|
|
||||||
<Filename Value="..\run\JvCustomControls\jvchart.pas"/>
|
|
||||||
<UnitName Value="JvChart"/>
|
|
||||||
</Item14>
|
|
||||||
</Files>
|
</Files>
|
||||||
<RequiredPkgs Count="2">
|
<RequiredPkgs Count="2">
|
||||||
<Item1>
|
<Item1>
|
||||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user