qesuite 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +9 -0
- package/dist/index.mjs +8 -0
- package/index.ts +63 -2
- package/package.json +1 -1
- package/versions/1_0_7.md +3 -0
- package/versions/1_0_8.md +6 -0
package/dist/index.d.mts
CHANGED
|
@@ -221,6 +221,7 @@ declare function SixPack(data: number[], specification: QESpecification, title?:
|
|
|
221
221
|
};
|
|
222
222
|
declare function IndividualValuePlot(data: number[], title?: string, historicalMean?: number): HTMLCanvasElement;
|
|
223
223
|
declare function MovingRangeChart(data: number[], title?: string, w?: number): HTMLCanvasElement;
|
|
224
|
+
declare function LastObservationsChart(data: number[], N: number, title?: string): HTMLCanvasElement;
|
|
224
225
|
declare function CreateCapabilityHistogram(data: number[], specification: QESpecification): HTMLCanvasElement;
|
|
225
226
|
/** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
226
227
|
*/
|
|
@@ -1120,4 +1121,4 @@ declare function GRR_Graphs(data: any, tolerance: number, name?: string): {
|
|
|
1120
1121
|
declare function GRR_ByPartChart(data: GRR_Data): HTMLCanvasElement;
|
|
1121
1122
|
declare function GRR_PartxOperatorChart(data: GRR_Data): HTMLCanvasElement;
|
|
1122
1123
|
|
|
1123
|
-
export { AnovaTableTwoWay, AverageMovingRange, Beta, CanvasDrawSettings, Capability, CreateBoxandWhiskerGraph, CreateCapabilityHistogram, CreateCategoricalBarGraph, CreateContinuousBarGraph, CreateScatterPlot, CreateSplitGraph, CreateStackedChart, CreateSummaryChart, Distributions, ERF, EngFont, FixedPointIteration, G1, G1_Graphs, GRR, GRR_ByPartChart, GRR_Data, GRR_Graphs, GRR_Operator, GRR_PartxOperatorChart, GRR_Replication, GageEvaluation, Gamma, GetFunctionValues, GetHistogramDataset, GoodnessOfFit, IndividualDistributionIdentification, IndividualDistributionPlots, IndividualValuePlot, Margin, MarkOutOfControl, Mean, Median, MovingRange, MovingRangeChart, NewtonRaphson, ObjectToArray, Point, QEAxisSettings, QEChart, QEChartSettings, QECustomGridline, QEDataCollection, QEDataSet, QELine, QESpecification, QQPlot, QQPlotChart, Range, RoundTO, SerializeData, SixPack, StDev, Sum, UnbiasingConstant, VarianceComponents };
|
|
1124
|
+
export { AnovaTableTwoWay, AverageMovingRange, Beta, CanvasDrawSettings, Capability, CreateBoxandWhiskerGraph, CreateCapabilityHistogram, CreateCategoricalBarGraph, CreateContinuousBarGraph, CreateScatterPlot, CreateSplitGraph, CreateStackedChart, CreateSummaryChart, Distributions, ERF, EngFont, FixedPointIteration, G1, G1_Graphs, GRR, GRR_ByPartChart, GRR_Data, GRR_Graphs, GRR_Operator, GRR_PartxOperatorChart, GRR_Replication, GageEvaluation, Gamma, GetFunctionValues, GetHistogramDataset, GoodnessOfFit, IndividualDistributionIdentification, IndividualDistributionPlots, IndividualValuePlot, LastObservationsChart, Margin, MarkOutOfControl, Mean, Median, MovingRange, MovingRangeChart, NewtonRaphson, ObjectToArray, Point, QEAxisSettings, QEChart, QEChartSettings, QECustomGridline, QEDataCollection, QEDataSet, QELine, QESpecification, QQPlot, QQPlotChart, Range, RoundTO, SerializeData, SixPack, StDev, Sum, UnbiasingConstant, VarianceComponents };
|
package/dist/index.d.ts
CHANGED
|
@@ -221,6 +221,7 @@ declare function SixPack(data: number[], specification: QESpecification, title?:
|
|
|
221
221
|
};
|
|
222
222
|
declare function IndividualValuePlot(data: number[], title?: string, historicalMean?: number): HTMLCanvasElement;
|
|
223
223
|
declare function MovingRangeChart(data: number[], title?: string, w?: number): HTMLCanvasElement;
|
|
224
|
+
declare function LastObservationsChart(data: number[], N: number, title?: string): HTMLCanvasElement;
|
|
224
225
|
declare function CreateCapabilityHistogram(data: number[], specification: QESpecification): HTMLCanvasElement;
|
|
225
226
|
/** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
226
227
|
*/
|
|
@@ -1120,4 +1121,4 @@ declare function GRR_Graphs(data: any, tolerance: number, name?: string): {
|
|
|
1120
1121
|
declare function GRR_ByPartChart(data: GRR_Data): HTMLCanvasElement;
|
|
1121
1122
|
declare function GRR_PartxOperatorChart(data: GRR_Data): HTMLCanvasElement;
|
|
1122
1123
|
|
|
1123
|
-
export { AnovaTableTwoWay, AverageMovingRange, Beta, CanvasDrawSettings, Capability, CreateBoxandWhiskerGraph, CreateCapabilityHistogram, CreateCategoricalBarGraph, CreateContinuousBarGraph, CreateScatterPlot, CreateSplitGraph, CreateStackedChart, CreateSummaryChart, Distributions, ERF, EngFont, FixedPointIteration, G1, G1_Graphs, GRR, GRR_ByPartChart, GRR_Data, GRR_Graphs, GRR_Operator, GRR_PartxOperatorChart, GRR_Replication, GageEvaluation, Gamma, GetFunctionValues, GetHistogramDataset, GoodnessOfFit, IndividualDistributionIdentification, IndividualDistributionPlots, IndividualValuePlot, Margin, MarkOutOfControl, Mean, Median, MovingRange, MovingRangeChart, NewtonRaphson, ObjectToArray, Point, QEAxisSettings, QEChart, QEChartSettings, QECustomGridline, QEDataCollection, QEDataSet, QELine, QESpecification, QQPlot, QQPlotChart, Range, RoundTO, SerializeData, SixPack, StDev, Sum, UnbiasingConstant, VarianceComponents };
|
|
1124
|
+
export { AnovaTableTwoWay, AverageMovingRange, Beta, CanvasDrawSettings, Capability, CreateBoxandWhiskerGraph, CreateCapabilityHistogram, CreateCategoricalBarGraph, CreateContinuousBarGraph, CreateScatterPlot, CreateSplitGraph, CreateStackedChart, CreateSummaryChart, Distributions, ERF, EngFont, FixedPointIteration, G1, G1_Graphs, GRR, GRR_ByPartChart, GRR_Data, GRR_Graphs, GRR_Operator, GRR_PartxOperatorChart, GRR_Replication, GageEvaluation, Gamma, GetFunctionValues, GetHistogramDataset, GoodnessOfFit, IndividualDistributionIdentification, IndividualDistributionPlots, IndividualValuePlot, LastObservationsChart, Margin, MarkOutOfControl, Mean, Median, MovingRange, MovingRangeChart, NewtonRaphson, ObjectToArray, Point, QEAxisSettings, QEChart, QEChartSettings, QECustomGridline, QEDataCollection, QEDataSet, QELine, QESpecification, QQPlot, QQPlotChart, Range, RoundTO, SerializeData, SixPack, StDev, Sum, UnbiasingConstant, VarianceComponents };
|
package/dist/index.js
CHANGED
|
@@ -53,6 +53,7 @@ __export(QESuite_exports, {
|
|
|
53
53
|
IndividualDistributionIdentification: () => IndividualDistributionIdentification,
|
|
54
54
|
IndividualDistributionPlots: () => IndividualDistributionPlots,
|
|
55
55
|
IndividualValuePlot: () => IndividualValuePlot,
|
|
56
|
+
LastObservationsChart: () => LastObservationsChart,
|
|
56
57
|
Margin: () => Margin,
|
|
57
58
|
MarkOutOfControl: () => MarkOutOfControl,
|
|
58
59
|
Mean: () => Mean,
|
|
@@ -489,6 +490,9 @@ function ObjectToArray(object) {
|
|
|
489
490
|
return returnArray;
|
|
490
491
|
}
|
|
491
492
|
function RoundTO(number, digits) {
|
|
493
|
+
if (number === 0) {
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
492
496
|
let str = number.toString();
|
|
493
497
|
let decimalIndex = str.indexOf(".");
|
|
494
498
|
let returner = Number(str.substring(0, decimalIndex + digits + 1));
|
|
@@ -2806,6 +2810,10 @@ function CreateSummaryChart(charts, title) {
|
|
|
2806
2810
|
if (!ctx) {
|
|
2807
2811
|
return canvas;
|
|
2808
2812
|
}
|
|
2813
|
+
ctx.beginPath();
|
|
2814
|
+
ctx.fillStyle = "white";
|
|
2815
|
+
ctx.fillRect(0, 0, width, height);
|
|
2816
|
+
ctx.closePath();
|
|
2809
2817
|
let fontsize = 96;
|
|
2810
2818
|
ctx.font = `${fontsize}px calibri`;
|
|
2811
2819
|
ctx.textAlign = "center";
|
|
@@ -3638,6 +3646,7 @@ function GRR_PartxOperatorChart(data) {
|
|
|
3638
3646
|
IndividualDistributionIdentification,
|
|
3639
3647
|
IndividualDistributionPlots,
|
|
3640
3648
|
IndividualValuePlot,
|
|
3649
|
+
LastObservationsChart,
|
|
3641
3650
|
Margin,
|
|
3642
3651
|
MarkOutOfControl,
|
|
3643
3652
|
Mean,
|
package/dist/index.mjs
CHANGED
|
@@ -406,6 +406,9 @@ function ObjectToArray(object) {
|
|
|
406
406
|
return returnArray;
|
|
407
407
|
}
|
|
408
408
|
function RoundTO(number, digits) {
|
|
409
|
+
if (number === 0) {
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
409
412
|
let str = number.toString();
|
|
410
413
|
let decimalIndex = str.indexOf(".");
|
|
411
414
|
let returner = Number(str.substring(0, decimalIndex + digits + 1));
|
|
@@ -2723,6 +2726,10 @@ function CreateSummaryChart(charts, title) {
|
|
|
2723
2726
|
if (!ctx) {
|
|
2724
2727
|
return canvas;
|
|
2725
2728
|
}
|
|
2729
|
+
ctx.beginPath();
|
|
2730
|
+
ctx.fillStyle = "white";
|
|
2731
|
+
ctx.fillRect(0, 0, width, height);
|
|
2732
|
+
ctx.closePath();
|
|
2726
2733
|
let fontsize = 96;
|
|
2727
2734
|
ctx.font = `${fontsize}px calibri`;
|
|
2728
2735
|
ctx.textAlign = "center";
|
|
@@ -3554,6 +3561,7 @@ export {
|
|
|
3554
3561
|
IndividualDistributionIdentification,
|
|
3555
3562
|
IndividualDistributionPlots,
|
|
3556
3563
|
IndividualValuePlot,
|
|
3564
|
+
LastObservationsChart,
|
|
3557
3565
|
Margin,
|
|
3558
3566
|
MarkOutOfControl,
|
|
3559
3567
|
Mean,
|
package/index.ts
CHANGED
|
@@ -468,6 +468,7 @@ export function ObjectToArray(object: any){
|
|
|
468
468
|
}
|
|
469
469
|
|
|
470
470
|
export function RoundTO(number: number, digits: number){
|
|
471
|
+
if(number === 0){return}
|
|
471
472
|
let str = number.toString();
|
|
472
473
|
let decimalIndex = str.indexOf('.');
|
|
473
474
|
let returner = Number(str.substring(0, decimalIndex + digits + 1));
|
|
@@ -619,7 +620,6 @@ export function IndividualValuePlot(data: number[], title?: string, historicalMe
|
|
|
619
620
|
MarkOutOfControl(dataset, UCL, LCL);
|
|
620
621
|
|
|
621
622
|
return CreateScatterPlot([dataset], title, chartSettings);
|
|
622
|
-
|
|
623
623
|
}
|
|
624
624
|
|
|
625
625
|
export function MovingRangeChart(data: number[], title?: string, w: number = 2){
|
|
@@ -661,7 +661,7 @@ export function MovingRangeChart(data: number[], title?: string, w: number = 2){
|
|
|
661
661
|
return CreateScatterPlot([dataset], title, chartSettings);
|
|
662
662
|
}
|
|
663
663
|
|
|
664
|
-
function LastObservationsChart(data: number[], N: number, title?: string){
|
|
664
|
+
export function LastObservationsChart(data: number[], N: number, title?: string){
|
|
665
665
|
|
|
666
666
|
let last = data.slice(-N);
|
|
667
667
|
let mean = Mean(last);
|
|
@@ -3096,6 +3096,12 @@ export function CreateSummaryChart(charts: HTMLCanvasElement[], title: string){
|
|
|
3096
3096
|
let ctx = canvas.getContext('2d');
|
|
3097
3097
|
|
|
3098
3098
|
if(!ctx){return canvas}
|
|
3099
|
+
// Draw white background
|
|
3100
|
+
ctx.beginPath();
|
|
3101
|
+
ctx.fillStyle = 'white';
|
|
3102
|
+
ctx.fillRect(0,0,width, height);
|
|
3103
|
+
ctx.closePath();
|
|
3104
|
+
|
|
3099
3105
|
let fontsize = 96;
|
|
3100
3106
|
ctx.font = `${fontsize}px calibri`;
|
|
3101
3107
|
ctx.textAlign ='center';
|
|
@@ -4093,6 +4099,61 @@ export function GRR_PartxOperatorChart(data: GRR_Data){
|
|
|
4093
4099
|
return CreateScatterPlot(dataSets ,'Part * Operator Interaction', chartSettings)
|
|
4094
4100
|
}
|
|
4095
4101
|
|
|
4102
|
+
function CompileGRRObject(operators, parts, measurements){
|
|
4103
|
+
let arrayOfSmallerObjects: any[] = [];
|
|
4104
|
+
if(!(operators.length === parts.length && operators.length === measurements.length)){return}
|
|
4105
|
+
|
|
4106
|
+
operators.forEach((o, i) => {
|
|
4107
|
+
arrayOfSmallerObjects.push({operator: o, part: parts[i], measurement: measurements[i]});
|
|
4108
|
+
})
|
|
4109
|
+
|
|
4110
|
+
let sortedByOperators = SplitObjectArrayByProp(arrayOfSmallerObjects, "operator")
|
|
4111
|
+
|
|
4112
|
+
let thenSortedByParts: any[] = [];
|
|
4113
|
+
|
|
4114
|
+
sortedByOperators.forEach(s => {
|
|
4115
|
+
let entriesByPart = SplitObjectArrayByProp(s.entries, "part");
|
|
4116
|
+
let obj = {
|
|
4117
|
+
operator: s.selector,
|
|
4118
|
+
entriesByPart: entriesByPart
|
|
4119
|
+
}
|
|
4120
|
+
thenSortedByParts.push(obj)
|
|
4121
|
+
})
|
|
4122
|
+
|
|
4123
|
+
let grrData = new GRR_Data([]);
|
|
4124
|
+
|
|
4125
|
+
thenSortedByParts.forEach(t => {
|
|
4126
|
+
let numberOfReps = t.entriesByPart[0].entries.length;
|
|
4127
|
+
|
|
4128
|
+
let grrOp = new GRR_Operator([], t.operator);
|
|
4129
|
+
for(let i = 0; i < numberOfReps; i++){
|
|
4130
|
+
let newRep = new GRR_Replication([]);
|
|
4131
|
+
t.entriesByPart.forEach(e => {
|
|
4132
|
+
newRep.parts.push(e.entries[i].measurement);
|
|
4133
|
+
})
|
|
4134
|
+
grrOp.replications.push(newRep);
|
|
4135
|
+
}
|
|
4136
|
+
grrData.operators.push(grrOp);
|
|
4137
|
+
})
|
|
4138
|
+
return grrData
|
|
4139
|
+
}
|
|
4140
|
+
|
|
4141
|
+
function SplitObjectArrayByProp(array: any[], prop: string){
|
|
4142
|
+
let newArray: any[] = [];
|
|
4143
|
+
array.forEach(a => {
|
|
4144
|
+
let propValue = a[prop];
|
|
4145
|
+
let newObj = newArray.find(entry => entry.selector === propValue);
|
|
4146
|
+
if(newObj){
|
|
4147
|
+
newObj.entries.push(a);
|
|
4148
|
+
}else{
|
|
4149
|
+
newArray.push({
|
|
4150
|
+
selector: propValue,
|
|
4151
|
+
entries: [a]
|
|
4152
|
+
})
|
|
4153
|
+
}
|
|
4154
|
+
})
|
|
4155
|
+
return newArray;
|
|
4156
|
+
}
|
|
4096
4157
|
// End Measurement Systems Analysis
|
|
4097
4158
|
/** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
4098
4159
|
*/
|
package/package.json
CHANGED