LazStats: Use TAChart and template form in CChartUnit.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7655 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-09-07 22:55:35 +00:00
parent c0ccf0b079
commit 1bd030f0e4
10 changed files with 408 additions and 696 deletions

View File

@ -752,674 +752,674 @@
<UnitName Value="CUMSUMUnit"/>
</Unit89>
<Unit90>
<Filename Value="forms\analysis\statistical_process_control\cchartunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="cChartFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="CChartUnit"/>
</Unit90>
<Unit91>
<Filename Value="forms\analysis\statistical_process_control\pchartunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="pChartFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="PChartUnit"/>
</Unit91>
<Unit92>
</Unit90>
<Unit91>
<Filename Value="forms\analysis\statistical_process_control\uchartunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="UChartFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="UChartUnit"/>
</Unit92>
<Unit93>
</Unit91>
<Unit92>
<Filename Value="forms\simulations\corsimunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="CorSimFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="CorSimUnit"/>
</Unit93>
<Unit94>
</Unit92>
<Unit93>
<Filename Value="forms\simulations\multgenunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="MultGenFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="MultGenUnit"/>
</Unit94>
<Unit95>
</Unit93>
<Unit94>
<Filename Value="forms\simulations\errorcurvesunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="ErrorCurvesFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="ErrorCurvesUnit"/>
</Unit95>
<Unit96>
</Unit94>
<Unit95>
<Filename Value="forms\simulations\pcurvesunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="PCurvesFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="PCurvesUnit"/>
</Unit96>
<Unit97>
</Unit95>
<Unit96>
<Filename Value="forms\simulations\distribunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="DistribFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="DistribUnit"/>
</Unit97>
<Unit98>
</Unit96>
<Unit97>
<Filename Value="forms\simulations\gensequnit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="GenSeqFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="GenSeqUnit"/>
</Unit98>
<Unit99>
</Unit97>
<Unit98>
<Filename Value="forms\simulations\genrndvalsunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="GenRndValsFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="GenRndValsUnit"/>
</Unit99>
<Unit100>
</Unit98>
<Unit99>
<Filename Value="forms\analysis\financial\loanitunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="LoanItFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="LoanItUnit"/>
</Unit100>
<Unit101>
</Unit99>
<Unit100>
<Filename Value="forms\analysis\financial\sumyrsdepunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="SumYrsDepFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="SumYrsDepUnit"/>
</Unit101>
<Unit102>
</Unit100>
<Unit101>
<Filename Value="forms\analysis\financial\sldunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="SLDepFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="SLDUnit"/>
</Unit102>
<Unit103>
</Unit101>
<Unit102>
<Filename Value="forms\analysis\financial\dbldeclineunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="DblDeclineFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="DblDeclineUnit"/>
</Unit103>
<Unit104>
</Unit102>
<Unit103>
<Filename Value="forms\analysis\nonparametric\riditunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="RIDITFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="RIDITUnit"/>
</Unit104>
<Unit105>
</Unit103>
<Unit104>
<Filename Value="forms\analysis\multiple_regression\twoslsunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="TwoSLSFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="TwoSLSUnit"/>
</Unit105>
<Unit106>
</Unit104>
<Unit105>
<Filename Value="forms\analysis\multiple_regression\wlsunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="WLSFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="WLSUnit"/>
</Unit106>
<Unit107>
</Unit105>
<Unit106>
<Filename Value="forms\analysis\multivariate\avglinkunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="AvgLinkFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="AvgLinkUnit"/>
</Unit107>
<Unit108>
</Unit106>
<Unit107>
<Filename Value="forms\tools\sortcasesunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="SortCasesFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="SortCasesUnit"/>
</Unit108>
<Unit109>
</Unit107>
<Unit108>
<Filename Value="forms\tools\selectcasesunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="SelectFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="SelectCasesUnit"/>
</Unit109>
<Unit110>
</Unit108>
<Unit109>
<Filename Value="forms\tools\selectifunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="SelectIfFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="SelectIfUnit"/>
</Unit110>
<Unit111>
</Unit109>
<Unit110>
<Filename Value="forms\tools\randomsampunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="RandomSampFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="RandomSampUnit"/>
</Unit111>
<Unit112>
</Unit110>
<Unit111>
<Filename Value="forms\tools\rangeselectunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="RangeSelectFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="RangeSelectUnit"/>
</Unit112>
<Unit113>
</Unit111>
<Unit112>
<Filename Value="forms\help\gridhelpunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="GridHelpFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="GridHelpUnit"/>
</Unit113>
<Unit114>
</Unit112>
<Unit113>
<Filename Value="forms\variables\recodeunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="RecodeFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="RecodeUnit"/>
</Unit114>
<Unit115>
</Unit113>
<Unit114>
<Filename Value="forms\analysis\nonparametric\kappaunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="WeightedKappaFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="KappaUnit"/>
</Unit115>
<Unit116>
</Unit114>
<Unit115>
<Filename Value="forms\analysis\multivariate\kmeansunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="KMeansFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="KMeansUnit"/>
</Unit116>
<Unit117>
</Unit115>
<Unit116>
<Filename Value="forms\analysis\multivariate\singlelinkunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="SingleLinkFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="SingleLinkUnit"/>
</Unit117>
<Unit118>
</Unit116>
<Unit117>
<Filename Value="forms\analysis\nonparametric\genkappaunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="GenKappaFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="GenKappaUnit"/>
</Unit118>
<Unit119>
</Unit117>
<Unit118>
<Filename Value="forms\analysis\matrix_manipulation\matmanunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="MatManFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="MatManUnit"/>
</Unit119>
<Unit120>
</Unit118>
<Unit119>
<Filename Value="forms\analysis\matrix_manipulation\scripteditorunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="ScriptEditorFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="ScriptEditorUnit"/>
</Unit120>
<Unit121>
</Unit119>
<Unit120>
<Filename Value="forms\analysis\matrix_manipulation\rootmethodunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="RootMethodFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="RootMethodUnit"/>
</Unit121>
<Unit122>
</Unit120>
<Unit121>
<Filename Value="forms\analysis\matrix_manipulation\scriptoptsunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="ScriptOptsFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="ScriptOptsUnit"/>
</Unit122>
<Unit123>
</Unit121>
<Unit122>
<Filename Value="forms\analysis\matrix_manipulation\colinsertunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="ColInsertFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="ColInsertUnit"/>
</Unit123>
<Unit124>
</Unit122>
<Unit123>
<Filename Value="forms\analysis\matrix_manipulation\rowinsertunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="RowInsertFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="RowInsertUnit"/>
</Unit124>
<Unit125>
</Unit123>
<Unit124>
<Filename Value="forms\analysis\measurement_programs\gradebookunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="GradebookFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="GradeBookUnit"/>
</Unit125>
<Unit126>
</Unit124>
<Unit125>
<Filename Value="forms\analysis\measurement_programs\gradingunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="GradingFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="GradingUnit"/>
</Unit126>
<Unit127>
</Unit125>
<Unit126>
<Filename Value="forms\simulations\probzunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="ProbzForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="ProbZUnit"/>
</Unit127>
<Unit128>
</Unit126>
<Unit127>
<Filename Value="forms\simulations\probsmallerzunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="ProbSmallerzForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="ProbSmallerZUnit"/>
</Unit128>
<Unit129>
</Unit127>
<Unit128>
<Filename Value="forms\simulations\twozprobunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="TwozProbForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="TwoZProbUnit"/>
</Unit129>
<Unit130>
</Unit128>
<Unit129>
<Filename Value="forms\simulations\inversezunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="InversezForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="InverseZUnit"/>
</Unit130>
<Unit131>
</Unit129>
<Unit130>
<Filename Value="forms\simulations\probchisqrunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="ChiSqrProbForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="ProbChiSqrUnit"/>
</Unit131>
<Unit132>
</Unit130>
<Unit131>
<Filename Value="forms\simulations\tprobunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="TprobForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="tProbUnit"/>
</Unit132>
<Unit133>
</Unit131>
<Unit132>
<Filename Value="forms\simulations\fprobunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="FForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="FProbUnit"/>
</Unit133>
<Unit134>
</Unit132>
<Unit133>
<Filename Value="forms\simulations\hypergeounit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="HyperGeoForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="HyperGeoUnit"/>
</Unit134>
<Unit135>
</Unit133>
<Unit134>
<Filename Value="forms\analysis\comparisons\bnestaunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="BNestedAForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="BNestAUnit"/>
</Unit135>
<Unit136>
</Unit134>
<Unit135>
<Filename Value="forms\analysis\comparisons\abcnestedunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="ABCNestedForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="ABCNestedUnit"/>
</Unit136>
<Unit137>
</Unit135>
<Unit136>
<Filename Value="forms\analysis\multivariate\bartletttestunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="BartlettTestForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="BartlettTestUnit"/>
</Unit137>
<Unit138>
</Unit136>
<Unit137>
<Filename Value="forms\tools\datasmoothunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="SmoothDataForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="DataSmoothUnit"/>
</Unit138>
<Unit139>
</Unit137>
<Unit138>
<Filename Value="forms\analysis\descriptive\groupfrequnit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="GroupFreqForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="GroupFreqUnit"/>
</Unit139>
<Unit140>
</Unit138>
<Unit139>
<Filename Value="forms\analysis\nonparametric\runstestunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="runstestform"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="RunsTestUnit"/>
</Unit140>
<Unit141>
</Unit139>
<Unit140>
<Filename Value="forms\analysis\descriptive\xvsmultyunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="XvsMultYForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="XvsMultYUnit"/>
</Unit141>
<Unit142>
</Unit140>
<Unit141>
<Filename Value="forms\analysis\nonparametric\sensunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="SensForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="SensUnit"/>
</Unit142>
<Unit143>
</Unit141>
<Unit142>
<Filename Value="forms\analysis\multivariate\correspondenceunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="CorrespondenceForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="CorrespondenceUnit"/>
</Unit143>
<Unit144>
</Unit142>
<Unit143>
<Filename Value="forms\analysis\descriptive\comparedistunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="CompareDistFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="CompareDistUnit"/>
</Unit144>
<Unit145>
</Unit143>
<Unit144>
<Filename Value="forms\variables\equationunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="EquationForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="EquationUnit"/>
</Unit145>
<Unit146>
</Unit144>
<Unit145>
<Filename Value="forms\misc\contexthelpunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="ContextHelpForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="ContextHelpUnit"/>
</Unit146>
<Unit147>
</Unit145>
<Unit146>
<Filename Value="forms\tools\calculatorunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="CalculatorForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="CalculatorUnit"/>
</Unit147>
<Unit148>
</Unit146>
<Unit147>
<Filename Value="forms\tools\jpegunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="JPEGform"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="JpegUnit"/>
</Unit148>
<Unit149>
</Unit147>
<Unit148>
<Filename Value="forms\analysis\descriptive\resistancelineunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="ResistanceLineForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="ResistanceLineUnit"/>
</Unit149>
<Unit150>
</Unit148>
<Unit149>
<Filename Value="forms\analysis\multivariate\medianpolishunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="MedianPolishForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="MedianPolishUnit"/>
</Unit150>
<Unit151>
</Unit149>
<Unit150>
<Filename Value="forms\analysis\comparisons\onecaseanovaunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="OneCaseAnovaForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="OneCaseANOVAUnit"/>
</Unit151>
<Unit152>
</Unit150>
<Unit151>
<Filename Value="forms\analysis\descriptive\smoothdataunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="DataSmoothingForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="SmoothDataUnit"/>
</Unit152>
<Unit153>
</Unit151>
<Unit152>
<Filename Value="forms\analysis\nonparametric\srhtestunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="SRHTest"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="SRHTestUnit"/>
</Unit153>
<Unit154>
</Unit152>
<Unit153>
<Filename Value="forms\help\aboutunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="AboutBox"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="AboutUnit"/>
</Unit154>
<Unit155>
</Unit153>
<Unit154>
<Filename Value="forms\analysis\measurement_programs\item_banking\itembankingunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="ItemBankFrm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="ItemBankingUnit"/>
</Unit155>
<Unit156>
</Unit154>
<Unit155>
<Filename Value="forms\analysis\measurement_programs\item_banking\itemcodesunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="CodesForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="ItemCodesUnit"/>
</Unit156>
<Unit157>
</Unit155>
<Unit156>
<Filename Value="forms\analysis\measurement_programs\item_banking\tfitemunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="TFItemForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="TFItemUnit"/>
</Unit157>
<Unit158>
</Unit156>
<Unit157>
<Filename Value="forms\analysis\measurement_programs\item_banking\essayitemunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="EssayItemForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="EssayItemUnit"/>
</Unit158>
<Unit159>
</Unit157>
<Unit158>
<Filename Value="forms\analysis\measurement_programs\item_banking\mcitemunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="MCItemForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="MCItemUnit"/>
</Unit159>
<Unit160>
</Unit158>
<Unit159>
<Filename Value="forms\analysis\measurement_programs\item_banking\matchitemunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="MatchItemForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="MatchItemUnit"/>
</Unit160>
<Unit161>
</Unit159>
<Unit160>
<Filename Value="forms\analysis\measurement_programs\item_banking\testspecsunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="TestSpecsForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="TestSpecsUnit"/>
</Unit161>
<Unit162>
</Unit160>
<Unit161>
<Filename Value="forms\analysis\nonparametric\simplechisqrunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="SimpleChiSqrForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="SimpleChiSqrUnit"/>
</Unit162>
<Unit163>
</Unit161>
<Unit162>
<Filename Value="forms\analysis\nonparametric\lifetableunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="LifeTableForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="LifeTableUnit"/>
</Unit163>
<Unit164>
</Unit162>
<Unit163>
<Filename Value="forms\analysis\multiple_regression\lsmrunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="LSMregForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="LSMRUnit"/>
</Unit164>
<Unit165>
</Unit163>
<Unit164>
<Filename Value="forms\maindm.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="MainDataModule"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="DataModule"/>
<UnitName Value="MainDM"/>
</Unit165>
<Unit166>
</Unit164>
<Unit165>
<Filename Value="units\utils.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="Utils"/>
</Unit166>
<Unit167>
</Unit165>
<Unit166>
<Filename Value="LazStats.inc"/>
<IsPartOfProject Value="True"/>
</Unit167>
<Unit168>
</Unit166>
<Unit167>
<Filename Value="forms\misc\chartunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="ChartForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="ChartUnit"/>
</Unit168>
<Unit169>
</Unit167>
<Unit168>
<Filename Value="units\mathunit.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="MathUnit"/>
</Unit169>
<Unit170>
</Unit168>
<Unit169>
<Filename Value="frames\chartframeunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="ChartFrame"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Frame"/>
<UnitName Value="ChartFrameUnit"/>
</Unit170>
<Unit171>
</Unit169>
<Unit170>
<Filename Value="forms\analysis\statistical_process_control\basicspcunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="BasicSPCForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="BasicSPCUnit"/>
</Unit171>
<Unit172>
</Unit170>
<Unit171>
<Filename Value="forms\analysis\statistical_process_control\schartunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="SChartForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="SChartUnit"/>
</Unit172>
<Unit173>
</Unit171>
<Unit172>
<Filename Value="forms\analysis\statistical_process_control\rchartunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="RChartForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="RChartUnit"/>
</Unit173>
<Unit174>
</Unit172>
<Unit173>
<Filename Value="forms\analysis\statistical_process_control\xbarchartunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="XBarChartForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="XBarChartUnit"/>
</Unit173>
<Unit174>
<Filename Value="forms\analysis\statistical_process_control\cchartunit.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="CChartForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="CChartUnit"/>
</Unit174>
</Units>
</ProjectOptions>

View File

@ -9,7 +9,7 @@ uses
Interfaces, // this includes the LCL widgetset
Forms, tachartlazaruspkg, tachartprint, lhelpcontrolpkg, Globals, LicenseUnit,
OptionsUnit, MainDM, MainUnit, MathUnit, BasicSPCUnit,
SChartUnit, rchartunit, XBarChartUnit; //, utils, chartunit;
SChartUnit, rchartunit, XBarChartUnit, cchartunit; //, utils, chartunit;
{$R LazStats.res}
@ -31,6 +31,7 @@ begin
Application.CreateForm(TOS3MainFrm, OS3MainFrm);
Application.CreateForm(TRChartForm, RChartForm);
Application.CreateForm(TXBarChartForm, XBarChartForm);
Application.CreateForm(TCChartForm, CChartForm);
Application.Run;
end.

View File

@ -16,6 +16,7 @@ object BasicSPCForm: TBasicSPCForm
Top = 0
Width = 357
Align = alLeft
BorderSpacing.Right = 3
BevelOuter = bvNone
ClientHeight = 438
ClientWidth = 357
@ -211,19 +212,20 @@ object BasicSPCForm: TBasicSPCForm
end
end
object SpecsSplitter: TSplitter
Left = 361
Left = 360
Height = 438
Top = 0
Width = 5
ResizeStyle = rsPattern
end
object PageControl1: TPageControl
Left = 370
Left = 368
Height = 426
Top = 6
Width = 551
Width = 553
ActivePage = ReportPage
Align = alClient
BorderSpacing.Left = 3
BorderSpacing.Top = 6
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
@ -232,30 +234,31 @@ object BasicSPCForm: TBasicSPCForm
object ReportPage: TTabSheet
Caption = 'Report'
ClientHeight = 398
ClientWidth = 543
ClientWidth = 545
object Panel1: TPanel
Left = 6
Height = 386
Top = 6
Width = 531
Width = 533
Align = alClient
BorderSpacing.Around = 6
BevelOuter = bvNone
BorderStyle = bsSingle
ClientHeight = 382
ClientWidth = 527
ClientWidth = 529
TabOrder = 0
object ReportMemo: TMemo
Left = 4
Height = 374
Top = 4
Width = 519
Width = 521
Align = alClient
BorderSpacing.Around = 4
BorderStyle = bsNone
Font.Height = -11
Font.Name = 'Courier New'
ParentFont = False
ScrollBars = ssAutoBoth
TabOrder = 0
end
end

View File

@ -223,14 +223,13 @@ const
CL_STYLE = psDot;
SPEC_STYLE = psSolid;
var
fn: String;
ser: TChartSeries;
rightLabels: TListChartSource;
constLine: TConstantLine;
rightLabels: TListChartSource;
s: String;
begin
fn := ExtractFileName(OS3MainFrm.FileNameEdit.Text);
rightLabels := FChartFrame.Chart.AxisList[2].Marks.Source as TListChartSource;
rightLabels.Clear;
FChartFrame.Clear;
FChartFrame.SetTitle(ATitle);
@ -238,8 +237,11 @@ begin
FChartFrame.SetYTitle(AYTitle);
ser := FChartFrame.PlotXY(ptSymbols, nil, Means, Groups, nil, ADataTitle, clBlack);
FChartFrame.Chart.BottomAxis.Marks.Source := ser.Source;
FChartFrame.Chart.BottomAxis.Marks.style := smsLabel;
if Length(Groups) > 0 then
begin
FChartFrame.Chart.BottomAxis.Marks.Source := ser.Source;
FChartFrame.Chart.BottomAxis.Marks.style := smsLabel;
end;
FChartFrame.HorLine(GrandMean, clRed, psSolid, AGrandMeanTitle);
rightLabels.Add(GrandMean, GrandMean, AGrandMeanTitle);
@ -287,6 +289,7 @@ begin
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
FChartFrame.Clear;
(FChartFrame.Chart.AxisList[2].Marks.Source as TListChartSource).Clear;
end;

View File

@ -1,237 +1,127 @@
object cChartFrm: TcChartFrm
Left = 677
Height = 316
Top = 312
Width = 445
inherited CChartForm: TCChartForm
Height = 420
HelpType = htKeyword
HelpKeyword = 'html/DefectnonconformitycChart.htm'
AutoSize = True
Caption = 'Defects C Chart'
ClientHeight = 316
ClientWidth = 445
ClientHeight = 420
OnActivate = FormActivate
OnCreate = FormCreate
OnShow = FormShow
Position = poMainFormCenter
LCLVersion = '2.1.0.0'
object Label1: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
Left = 8
Height = 15
Top = 8
Width = 97
BorderSpacing.Left = 8
BorderSpacing.Top = 8
Caption = 'Selection Variables'
ParentColor = False
end
object Label2: TLabel
AnchorSideLeft.Control = MeasEdit
AnchorSideTop.Control = Owner
Left = 209
Height = 15
Top = 8
Width = 120
BorderSpacing.Top = 8
Caption = 'Measurement Variable:'
ParentColor = False
end
object VarList: TListBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Label1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = SigmaOpts
AnchorSideBottom.Control = Bevel2
Left = 8
Height = 242
Top = 25
Width = 193
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 8
BorderSpacing.Top = 2
BorderSpacing.Right = 8
Constraints.MinHeight = 220
ItemHeight = 0
OnClick = VarListClick
TabOrder = 0
end
object MeasEdit: TEdit
AnchorSideLeft.Control = SigmaOpts
AnchorSideTop.Control = Label2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 209
Height = 23
Top = 25
Width = 228
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 2
BorderSpacing.Right = 8
TabOrder = 1
Text = 'MeasEdit'
end
object SigmaOpts: TRadioGroup
AnchorSideTop.Control = MeasEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 209
Height = 118
Top = 80
Width = 228
Anchors = [akTop, akRight]
AutoFill = True
AutoSize = True
BorderSpacing.Top = 32
BorderSpacing.Right = 8
Caption = 'No. of Sigma Units for UCL and LCL'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.HorizontalSpacing = 5
ChildSizing.VerticalSpacing = 2
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclTopToBottomThenLeftToRight
ChildSizing.ControlsPerLine = 4
ClientHeight = 98
ClientWidth = 224
ItemIndex = 0
Items.Strings = (
'3 Sigma (Default)'
'2 Sigma'
'1 Sigma'
'X Sigmas where X = '
)
TabOrder = 2
object Label3: TLabel
Left = 138
Height = 19
Top = 6
Width = 80
Caption = ' '
ParentColor = False
inherited SpecsPanel: TPanel
Height = 420
Width = 440
ClientHeight = 420
ClientWidth = 440
inherited ButtonPanel: TPanel
Top = 378
Width = 440
ClientWidth = 440
inherited CloseBtn: TButton
Left = 385
end
inherited ComputeBtn: TButton
Left = 301
end
inherited ResetBtn: TButton
Left = 239
end
inherited HelpBtn: TButton
Left = 188
end
inherited Bevel1: TBevel
Width = 432
end
end
object Label4: TLabel
Left = 138
Height = 19
Top = 27
Width = 80
Caption = ' '
ParentColor = False
inherited VarList: TListBox
Height = 345
Width = 216
end
object Label5: TLabel
Left = 138
Height = 19
Top = 48
Width = 80
Caption = ' '
ParentColor = False
inherited GroupLabel: TLabel
Left = 232
Visible = False
end
object XSigmaEdit: TEdit
Left = 138
Height = 23
Top = 69
Width = 80
Alignment = taRightJustify
TabOrder = 2
Text = 'XSigmaEdit'
inherited GroupEdit: TEdit
Left = 232
Width = 208
Visible = False
end
end
object Bevel2: TBevel
AnchorSideTop.Control = Panel1
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Panel1
Left = 0
Height = 8
Top = 267
Width = 445
Anchors = [akLeft, akRight, akBottom]
Shape = bsBottomLine
end
object Panel1: TPanel
Left = 8
Height = 25
Top = 283
Width = 429
Align = alBottom
AutoSize = True
BorderSpacing.Around = 8
BevelOuter = bvNone
ClientHeight = 25
ClientWidth = 429
TabOrder = 3
object ResetBtn: TButton
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = Panel1
AnchorSideRight.Control = ComputeBtn
Left = 228
Height = 25
Top = 0
Width = 54
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Right = 8
Caption = 'Reset'
OnClick = ResetBtnClick
TabOrder = 1
inherited MeasLabel: TLabel
Left = 232
end
object ComputeBtn: TButton
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = Panel1
AnchorSideRight.Control = CloseBtn
Left = 290
Height = 25
Top = 0
Width = 76
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Right = 8
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 2
inherited MeasEdit: TEdit
Left = 232
Width = 208
end
object HelpBtn: TButton
Tag = 141
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = ResetBtn
AnchorSideRight.Control = ResetBtn
Left = 169
Height = 25
Top = 0
Width = 51
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Right = 8
Caption = 'Help'
OnClick = HelpBtnClick
TabOrder = 0
inherited Bevel2: TBevel
Left = 209
end
object CloseBtn: TButton
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = Panel1
AnchorSideRight.Control = Panel1
object SigmaOptns: TRadioGroup[8]
AnchorSideLeft.Control = MeasEdit
AnchorSideTop.Control = MeasEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = SpecsPanel
AnchorSideRight.Side = asrBottom
Left = 374
Height = 25
Top = 0
Width = 55
Anchors = [akTop, akRight]
AutoSize = True
Caption = 'Close'
ModalResult = 11
TabOrder = 3
Left = 232
Height = 128
Top = 128
Width = 208
Anchors = [akTop, akLeft, akRight]
AutoFill = True
BorderSpacing.Top = 32
BorderSpacing.Bottom = 8
Caption = 'No. of Sigma Units for UCL and LCL'
ChildSizing.LeftRightSpacing = 12
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 108
ClientWidth = 204
ItemIndex = 0
Items.Strings = (
'3 Sigma (default)'
'2 Sigma'
'1 Sigma'
'x Sigmas with x = '
)
TabOrder = 4
object XSigmaEdit: TEdit
AnchorSideRight.Control = SigmaOptns
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Side = asrBottom
Left = 128
Height = 23
Top = 80
Width = 64
Alignment = taRightJustify
Anchors = [akLeft, akRight, akBottom]
TabOrder = 0
Text = 'XSigmaEdit'
end
end
end
object Bevel1: TBevel
Left = 4
Height = 23
Top = 290
Width = 25
Shape = bsSpacer
inherited SpecsSplitter: TSplitter
Left = 443
Height = 420
end
inherited PageControl1: TPageControl
Left = 451
Height = 408
Width = 470
inherited ReportPage: TTabSheet
ClientHeight = 380
ClientWidth = 462
inherited Panel1: TPanel
Height = 368
Width = 450
ClientHeight = 364
ClientWidth = 446
inherited ReportMemo: TMemo
Height = 356
Width = 438
end
end
end
end
end

View File

@ -5,162 +5,75 @@ unit CChartUnit;
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, ExtCtrls, Buttons,
MainUnit, Globals, DataProcs, OutputUnit, BlankFrmUnit, ContextHelpUnit;
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, ExtCtrls,
StdCtrls, BasicSPCUnit;
type
{ TcChartFrm }
{ TCChartForm }
TcChartFrm = class(TForm)
Bevel1: TBevel;
Bevel2: TBevel;
ComputeBtn: TButton;
HelpBtn: TButton;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Panel1: TPanel;
ResetBtn: TButton;
CloseBtn: TButton;
TCChartForm = class(TBasicSPCForm)
SigmaOptns: TRadioGroup;
XSigmaEdit: TEdit;
MeasEdit: TEdit;
Label1: TLabel;
Label2: TLabel;
VarList: TListBox;
SigmaOpts: TRadioGroup;
procedure ComputeBtnClick(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure HelpBtnClick(Sender: TObject);
procedure VarListClick(Sender: TObject);
procedure ResetBtnClick(Sender: TObject);
private
{ private declarations }
FAutoSized: Boolean;
procedure PlotMeans(var Means: DblDyneVec; NoGrps: integer;
UCL, LCL, GrandMean: double);
function Validate(out AMsg: String; out AControl: TWinControl): Boolean;
public
{ public declarations }
end;
protected
procedure Compute; override;
procedure Reset; override;
function Validate(out AMsg: String; out AControl: TWinControl): Boolean; override;
end;
var
cChartFrm: TcChartFrm;
CChartForm: TCChartForm;
implementation
{$R *.lfm}
uses
Math;
Math,
Globals, MainUnit, DataProcs;
{ TcChartFrm }
procedure TcChartFrm.ResetBtnClick(Sender: TObject);
{ TCChartForm }
procedure TCChartForm.Compute;
var
i: integer;
begin
VarList.Clear;
MeasEdit.Text := '';
for i := 1 to NoVariables do
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
end;
procedure TcChartFrm.FormActivate(Sender: TObject);
var
w: Integer;
begin
if FAutoSized then
exit;
w := MaxValue([HelpBtn.Width, ResetBtn.Width, ComputeBtn.Width, CloseBtn.Width]);
HelpBtn.Constraints.MinWidth := w;
ResetBtn.Constraints.MinWidth := w;
ComputeBtn.Constraints.MinWidth := w;
CloseBtn.Constraints.MinWidth := w;
VarList.Constraints.MinWidth := SigmaOpts.Width * 3 div 4;
Constraints.MinWidth := Width;
Constraints.MinHeight := Height;
FAutoSized := true;
end;
procedure TcChartFrm.FormCreate(Sender: TObject);
begin
Assert(OS3MainFrm <> nil);
if BlankFrm = nil then
Application.CreateForm(TBlankFrm, BlankFrm);
end;
procedure TcChartFrm.FormShow(Sender: TObject);
begin
ResetBtnClick(self);
end;
procedure TcChartFrm.HelpBtnClick(Sender: TObject);
begin
if ContextHelpForm = nil then
Application.CreateForm(TContextHelpForm, ContextHelpForm);
ContextHelpForm.HelpMessage((Sender as TButton).tag);
end;
procedure TcChartFrm.ComputeBtnClick(Sender: TObject);
var
i, MeasVar: integer;
X, size, UCL, LCL, Sigma: double;
GrandMean, meanc, stddevc: double;
means: DblDyneVec;
cellstring: string;
ColNoSelected: IntDyneVec;
NoSelected: integer;
msg: String;
C: TWinControl;
i: Integer;
ColNoSelected: IntDyneVec = nil;
means: DblDyneVec = nil;
X: Double;
meanC, stdDevC, UCL, LCL, sigma, grandMean: Double;
numData: Integer;
lReport: TStrings;
begin
if not Validate(msg, C) then
begin
C.SetFocus;
MessageDlg(msg, mtError, [mbOK], 0);
exit;
end;
SetLength(ColNoSelected,1);
MeasVar := 0;
for i := 1 to NoVariables do
begin
cellstring := OS3MainFrm.DataGrid.Cells[i,0];
if cellstring = MeasEdit.Text then MeasVar := i;
end;
NoSelected := 1;
ColNoSelected[0] := MeasVar;
case SigmaOpts.ItemIndex of
0: Sigma := 3.0;
case SigmaOptns.ItemIndex of
0: sigma := 3.0;
1: sigma := 2.0;
2: Sigma := 1.0;
3: Sigma := StrToFloat(XSigmaEdit.Text);
2: sigma := 1.0;
3: sigma := StrToFloat(XSigmaEdit.Text);
end;
SetLength(means, NoCases + 1);
GrandMean := 0.0;
size := 0;
grandMean := 0.0;
numData := 0;
for i := 1 to NoCases do
begin
if not GoodRecord(i,NoSelected,ColNoSelected) then continue;
X := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[MeasVar,i]));
means[i] := X;
GrandMean := GrandMean + X;
size := size + 1;
if not GoodRecord(i, Length(ColNoSelected), ColNoSelected) then continue;
X := StrToFloat(Trim(OS3MainFrm.DataGrid.Cells[MeasVar, i]));
means[i-1] := X;
grandMean := grandMean + X;
inc(numData);
end;
SetLength(means, numData);
meanc := GrandMean / size;
stddevc := sqrt(meanc);
UCL := meanc + Sigma * stddevc;
LCL := meanc - Sigma * stddevc;
meanc := grandMean / numData;
stdDevc := sqrt(meanc);
UCL := meanc + sigma * stddevc;
LCL := meanc - sigma * stddevc;
// printed results
lReport := TStringList.Create;
@ -168,190 +81,97 @@ begin
lReport.Add('DEFECTS c CONTROL CHART RESULTS');
lReport.Add('');
lReport.Add('Sample Number of ');
lReport.Add(' Nonconformities');
lReport.Add('------ ----------------');
lReport.Add(' Nonconformities');
lReport.Add('------ ---------------');
for i := 1 to NoCases do
lReport.Add(' %3d %8.2f', [i, means[i]]);
lReport.Add('%6d %15.2f', [i, means[i]]);
lReport.Add('');
lReport.Add('Total Nonconformities: %8.3f', [GrandMean]);
lReport.Add('No. of samples: %8d', [NoCases]);
lReport.Add('No. of samples: %8d', [numData]); //NoCases]);
lReport.Add('Poisson mean and variance: %8.3f', [meanc]);
lReport.Add('Lower Control Limit: %8.3f', [LCL]);
lReport.Add('Upper Control Limit: %8.3f', [UCL]);
DisplayReport(lReport);
ReportMemo.Lines.Assign(lReport);
finally
lReport.Free;
end;
// show graph
PlotMeans(means, NoCases, UCL, LCL, meanc);
// Show graph
PlotMeans(
Format('Defect Control C Chart for "%s"', [GetFileName]),
'Sample', MeasEdit.Text, 'Data', 'Mean',
nil, means,
UCL, LCL, meanc,
NaN, NaN, NaN
);
means := nil;
ColNoSelected := nil;
//PlotMeans(means, NoCases, UCL, LCL, meanc);
end;
procedure TcChartFrm.VarListClick(Sender: TObject);
procedure TCChartForm.FormActivate(Sender: TObject);
var
index: integer;
w: Integer;
begin
index := VarList.ItemIndex;
if index > -1 then
begin
MeasEdit.Text := VarList.Items[index];
VarList.Items.Delete(index);
w := MaxValue([HelpBtn.Width, ResetBtn.Width, ComputeBtn.Width, CloseBtn.Width]);
HelpBtn.Constraints.MinWidth := w;
ResetBtn.Constraints.MinWidth := w;
ComputeBtn.Constraints.MinWidth := w;
CloseBtn.Constraints.MinWidth := w;
DisableAutoSizing;
try
SigmaOptns.AnchorSideRight.Control := nil;
VarList.Constraints.MinWidth := VarListLabel.Width;
SpecsPanel.Constraints.MinWidth := Max(
CloseBtn.Left + CloseBtn.Width - HelpBtn.Left + HelpBtn.BorderSpacing.Around,
SigmaOptns.Width * 2 + VarList.BorderSpacing.Right + VarList.BorderSpacing.Left
);
Constraints.MinHeight := SigmaOptns.Top + SigmaOptns.Height + SigmaOptns.BorderSpacing.Bottom + ButtonPanel.Height;
SigmaOptns.AnchorSideRight.Control := MeasEdit;
SigmaOptns.AnchorSideRight.Side := asrBottom;
finally
EnableAutoSizing;
end;
end;
procedure TcChartFrm.PlotMeans(var means: DblDyneVec; NoGrps: integer; UCL,
LCL, GrandMean: double);
var
i, xpos, ypos, hleft, hright, vtop, vbottom, imagewide : integer;
vhi, hwide, offset, strhi : integer;
imagehi, maxval, minval, valincr, Yvalue : double;
Title : string;
procedure TCChartForm.Reset;
begin
maxval := -10000.0;
minval := 10000.0;
for i := 1 to NoGrps do
begin
if means[i] > maxval then maxval := means[i];
if means[i] < minval then minval := means[i];
end;
if UCL > maxval then maxval := UCL;
if LCL < minval then minval := LCL;
BlankFrm.Image1.Canvas.Clear;
BlankFrm.Show;
Title := 'DEFECT CONTROL (c) CHART FOR : ' + OS3MainFrm.FileNameEdit.Text;
BlankFrm.Caption := Title;
imagewide := BlankFrm.Image1.Width;
imagehi := BlankFrm.Image1.Height;
vtop := 20;
vbottom := round(imagehi) - 80;
vhi := vbottom - vtop;
hleft := 100;
hright := imagewide - 80;
hwide := hright - hleft;
BlankFrm.Image1.Canvas.Brush.Color := clLtGray;
BlankFrm.Image1.Canvas.FillRect(0, 0, BlankFrm.Image1.Width, BlankFrm.Image1.Height);
// Draw chart border
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.Brush.Color := clWhite;
BlankFrm.Image1.Canvas.Rectangle(hleft,vtop-10,hleft+hwide,vtop+vhi+10);
// draw Grand Mean
ypos := round(vhi * ( (maxval - GrandMean) / (maxval - minval)));
ypos := ypos + vtop;
xpos := hleft;
BlankFrm.Image1.Canvas.Pen.Color := clRed;
BlankFrm.Image1.Canvas.Brush.Style := bsClear;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
xpos := hright;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := 'MEAN';
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
ypos := ypos - strhi div 2;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
// draw horizontal axis
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.MoveTo(hleft,vbottom + 20);
BlankFrm.Image1.Canvas.LineTo(hright,vbottom + 20);
for i := 1 to NoGrps do
begin
ypos := vbottom + 10;
xpos := round((hwide / NoGrps)* i + hleft);
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
ypos := ypos + 10;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := format('%d',[i]);
offset := BlankFrm.Image1.Canvas.TextWidth(Title) div 2;
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
xpos := xpos - offset;
ypos := ypos + strhi;
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
xpos := 10;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,'GROUPS:');
end;
// Draw vertical axis
valincr := (maxval - minval) / 10.0;
for i := 1 to 11 do
begin
Title := format('%8.2f',[maxval - ((i-1)*valincr)]);
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
xpos := 10;
Yvalue := maxval - (valincr * (i-1));
ypos := round(vhi * ( (maxval - Yvalue) / (maxval - minval)));
ypos := ypos + vtop - strhi div 2;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
end;
// draw lines for means of the groups
ypos := round(vhi * ( (maxval - means[1]) / (maxval - minval)));
ypos := ypos + vtop;
xpos := round((hwide / NoGrps) + hleft);
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
BlankFrm.Image1.Canvas.Pen.Color := clBlack;
for i := 2 to NoGrps do
begin
ypos := round(vhi * ( (maxval - means[i]) / (maxval - minval)));
ypos := ypos + vtop;
xpos := round((hwide / NoGrps)* i + hleft);
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
end;
// Draw upper and lower confidence intervals
ypos := round(vhi * ( (maxval - UCL) / (maxval - minval)));
ypos := ypos + vtop;
xpos := hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
xpos := hright;
BlankFrm.Image1.Canvas.Pen.Color := clRed;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := 'UCL';
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
ypos := ypos - strhi div 2;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
ypos := round(vhi * ( (maxval - LCL) / (maxval - minval)));
ypos := ypos + vtop;
xpos := hleft;
BlankFrm.Image1.Canvas.MoveTo(xpos,ypos);
xpos := hright;
BlankFrm.Image1.Canvas.Pen.Color := clRed;
BlankFrm.Image1.Canvas.LineTo(xpos,ypos);
Title := 'LCL';
strhi := BlankFrm.Image1.Canvas.TextHeight(Title);
ypos := ypos - strhi div 2;
BlankFrm.Image1.Canvas.TextOut(xpos,ypos,Title);
inherited;
XSigmaEdit.Clear;
end;
function TCChartFrm.Validate(out AMsg: String; out AControl: TWinControl): Boolean;
function TCChartForm.Validate(out AMsg: String; out AControl: TWinControl): Boolean;
var
x: Double;
begin
Result := inherited;
if not Result then
exit;
Result := false;
if MeasEdit.Text = '' then
if SigmaOptns.ItemIndex = -1 then
begin
AMsg := 'Measurement variable not selected.';
AControl := MeasEdit;
AMsg := 'Number of sigma units for UCL and LCL not specified.';
AControl := SigmaOptns;
exit;
end;
if SigmaOpts.ItemIndex = 3 then
if SigmaOptns.ItemIndex = 3 then
begin
if XSigmaEdit.Text = '' then
if (XSigmaEdit.Text = '') then
begin
AMsg := 'X sigma not specified.';
AMsg := 'User-defined sigma units missing.';
AControl := XSigmaEdit;
exit;
end;
if not TryStrToFloat(XSigmaEdit.Text, x) then
begin
AMsg := 'X sigma is not a valid number.';
AMsg := 'No valid number given for sser-defined sigma units.';
AControl := XSigmaEdit;
exit;
end;
@ -360,8 +180,5 @@ begin
Result := true;
end;
initialization
{$I cchartunit.lrs}
end.

View File

@ -7,7 +7,6 @@ inherited XBarChartForm: TXBarChartForm
OnActivate = FormActivate
inherited SpecsPanel: TPanel
Width = 475
BorderSpacing.Right = 3
ClientWidth = 475
inherited ButtonPanel: TPanel
Width = 475
@ -207,7 +206,6 @@ inherited XBarChartForm: TXBarChartForm
inherited PageControl1: TPageControl
Left = 486
Width = 435
BorderSpacing.Left = 3
inherited ReportPage: TTabSheet
ClientWidth = 427
inherited Panel1: TPanel

View File

@ -182,7 +182,7 @@ begin
lReport.Free;
end;
// show graph
// Show graph
PlotMeans(
Format('x&#772; chart for "%s"', [GetFileName]),
GroupEdit.Text, MeasEdit.Text, 'Group means', 'Grand mean',

View File

@ -510,7 +510,7 @@ uses
BinomialUnit, KendallTauUnit, KaplanMeierUnit,
// Statistical process control
XBarChartUnit, RChartUnit, SChartUnit, CUMSUMUNIT, CCHARTUNIT,
XBarChartUnit, RChartUnit, SChartUnit, CUMSUMUNIT, CChartUnit,
PChartUnit, UChartUnit,
CorSimUnit,
@ -2160,9 +2160,9 @@ end;
// Menu "Analysis" > "Statistical Process Control" > "Defect (nonconformity) c Chart"
procedure TOS3MainFrm.mnuAnalysisSPC_CChartClick(Sender: TObject);
begin
if CChartFrm = nil then
Application.CreateForm(TCChartFrm, CChartFrm);
CChartFrm.ShowModal;
if CChartForm = nil then
Application.CreateForm(TCChartForm, CChartForm);
CChartForm.ShowModal;
end;
// Menu "Analysis" > "Financial" > "Sum of years digits depreciation"

View File

@ -6,8 +6,8 @@ object ChartFrame: TChartFrame
ClientHeight = 403
ClientWidth = 620
TabOrder = 0
DesignLeft = 353
DesignTop = 156
DesignLeft = 518
DesignTop = 150
object Chart: TChart
Left = 0
Height = 403