qesuite 1.0.4 → 1.0.5

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 CHANGED
@@ -27,6 +27,115 @@ declare class QESpecification {
27
27
  tolerance?: undefined;
28
28
  };
29
29
  SplitUnits(string: string): string[];
30
+ toString(): string;
31
+ }
32
+ declare class QEChartSettings {
33
+ constructor(xAxis?: QEAxisSettings, yAxis?: QEAxisSettings, width?: number, height?: number, margins?: Margin, chartArea?: CanvasDrawSettings, plotArea?: CanvasDrawSettings, title?: EngFont, hasLegend?: boolean, type?: string);
34
+ height: number;
35
+ width: number;
36
+ margins: Margin;
37
+ chartArea: CanvasDrawSettings;
38
+ plotArea: CanvasDrawSettings;
39
+ axis: {
40
+ x: QEAxisSettings;
41
+ y: QEAxisSettings;
42
+ };
43
+ title: EngFont;
44
+ hasLegend: boolean;
45
+ type: string;
46
+ }
47
+ declare class QEDataCollection {
48
+ constructor(name: string, data: any);
49
+ name: string;
50
+ data: any;
51
+ }
52
+ declare class CanvasDrawSettings {
53
+ constructor(fillColor?: string, strokeColor?: string, strokeWidth?: number, shape?: number, shapeRadius?: number);
54
+ fillColor: string;
55
+ strokeColor: string;
56
+ strokeWidth: number;
57
+ shape: number;
58
+ shapeRadius: number;
59
+ }
60
+ declare class QEAxisSettings {
61
+ constructor(min: number, max: number, name?: string, nameDisplay?: EngFont, count?: number, step?: number, scale?: string, padding?: Margin, strokeWidth?: number, strokeColor?: string, fillColor?: string, fontSize?: string, font?: string, textAlign?: string, labels?: string[], autoSize?: boolean, customGridlines?: QECustomGridline[], showAutoGridlines?: boolean, tickOnly?: boolean);
62
+ min: number;
63
+ max: number;
64
+ name: string;
65
+ nameDisplay: EngFont;
66
+ count: number;
67
+ step: number;
68
+ scale: string;
69
+ padding: Margin;
70
+ strokeWidth: number;
71
+ strokeColor: string;
72
+ fillColor: string;
73
+ fontSize: string;
74
+ font: string;
75
+ textAlign: string;
76
+ labels: string[];
77
+ autoSize: boolean;
78
+ customGridlines: QECustomGridline[];
79
+ showAutoGridlines: boolean;
80
+ tickOnly: boolean;
81
+ }
82
+ declare class QEChart {
83
+ constructor(data: QEDataSet[], type: string, title?: string, chartSettings?: QEChartSettings, plotFunction?: Function, functionInput?: {
84
+ min: number;
85
+ max: number;
86
+ count: number;
87
+ });
88
+ data: QEDataSet[];
89
+ type: string;
90
+ title: string;
91
+ chartSettings: QEChartSettings;
92
+ plotFunction: Function;
93
+ functionInput: {
94
+ min: number;
95
+ max: number;
96
+ count: number;
97
+ };
98
+ }
99
+ declare class QEDataSet {
100
+ constructor(values: Point[], name?: string, display?: CanvasDrawSettings, line?: QELine);
101
+ values: Point[];
102
+ name?: string;
103
+ display: CanvasDrawSettings;
104
+ line: QELine;
105
+ }
106
+ declare class QELine {
107
+ constructor(type?: string, display?: CanvasDrawSettings);
108
+ type?: string;
109
+ display: CanvasDrawSettings;
110
+ }
111
+ declare class QECustomGridline {
112
+ constructor(value: number, label?: string, display?: CanvasDrawSettings, font?: EngFont, opposite?: boolean, tickOnly?: boolean, dashed?: boolean);
113
+ value: number;
114
+ label: string;
115
+ display: CanvasDrawSettings;
116
+ font: EngFont;
117
+ opposite: boolean;
118
+ tickOnly: boolean;
119
+ dashed: boolean;
120
+ }
121
+ declare class Point {
122
+ constructor(x: number, y: number, display?: CanvasDrawSettings);
123
+ x: number;
124
+ y: number;
125
+ display: CanvasDrawSettings;
126
+ }
127
+ declare class Margin {
128
+ constructor(left: number, right: number, top: number, bottom: number);
129
+ left: number;
130
+ right: number;
131
+ top: number;
132
+ bottom: number;
133
+ }
134
+ declare class EngFont {
135
+ constructor(fillColor?: string, font?: string, fontSize?: string);
136
+ fillColor: string;
137
+ font: string;
138
+ fontSize: string;
30
139
  }
31
140
  declare class GRR_Data {
32
141
  constructor(operators: GRR_Operator[]);
@@ -54,6 +163,8 @@ declare class GRR_Replication {
54
163
  getPartsByIndex(index?: number): number[];
55
164
  getPartCount(): number;
56
165
  }
166
+ declare function ObjectToArray(object: any): any[];
167
+ declare function RoundTO(number: number, digits: number): number;
57
168
  /** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58
169
  */
59
170
  declare const Capability: {
@@ -760,6 +871,75 @@ declare const UnbiasingConstant: {
760
871
  d4?: undefined;
761
872
  })[];
762
873
  };
874
+ /**
875
+ * Return a serialized dataset
876
+ * @param data An array of data sets to plot
877
+ */
878
+ declare function SerializeData(data: number[]): QEDataSet;
879
+ /**
880
+ * Create a scatter plot
881
+ * @param data An array of data sets to plot
882
+ * @param chartSettings Chart settings
883
+ */
884
+ declare function CreateScatterPlot(data: QEDataSet[], title?: string, chartSettings?: QEChartSettings): HTMLCanvasElement;
885
+ /**
886
+ * Checks if data is out of control and marks out-of-control points
887
+ * @param data An array of data sets to check
888
+ * @param UCL Upper Control Limit
889
+ * @param LCL Lower Control Limit
890
+ * @param display Display settings for out-of-control points. DEFAULT: RED SQUARE
891
+ */
892
+ declare function MarkOutOfControl(data: QEDataSet, UCL: number, LCL: number, display?: CanvasDrawSettings): void;
893
+ /**
894
+ * Create a histogram
895
+ * @param data An array of data sets to plot
896
+ * @param title Title to display on chart
897
+ * @param bucketRange The difference between the high and low values of each bucket. If no value is provided the default will be StandardDeviation/3
898
+ * @param chartSettings Chart settings
899
+ */
900
+ declare function GetHistogramDataset(data: number[], title?: string, bucketRange?: number, chartSettings?: QEChartSettings): QEDataSet;
901
+ /**
902
+ * Create a bar graph
903
+ * @param data An array of data sets to plot
904
+ * @param chartSettings Chart settings
905
+ */
906
+ declare function CreateContinuousBarGraph(data: QEDataSet[], title?: string, chartSettings?: QEChartSettings, categoryLabels?: string[]): HTMLCanvasElement;
907
+ /**
908
+ * Create a bar graph
909
+ * @param data An array of data sets to plot
910
+ * @param title Chart Title
911
+ * @param chartSettings Chart settings
912
+ */
913
+ declare function CreateCategoricalBarGraph(data: QEDataCollection[], title?: string, chartSettings?: QEChartSettings): HTMLCanvasElement;
914
+ /**
915
+ * Create a bar graph
916
+ * @param data An array of data sets to plot
917
+ * @param title Chart Title
918
+ * @param chartSettings Chart settings
919
+ */
920
+ declare function CreateBoxandWhiskerGraph(data: QEDataSet[], title?: string, chartSettings?: QEChartSettings): HTMLCanvasElement;
921
+ /**
922
+ * Create a bar graph
923
+ * @param charts An array of charts to plot side by side
924
+ * @param title Chart Title
925
+ * @param chartSettings Chart settings
926
+ */
927
+ declare function CreateSplitGraph(charts: QEChart[], title: string, chartSettings?: QEChartSettings): HTMLCanvasElement;
928
+ /**
929
+ * Create a bar graph
930
+ * @param charts An array of charts to plot side by side
931
+ * @param title Chart Title
932
+ * @param chartSettings Chart settings
933
+ */
934
+ declare function CreateSummaryChart(charts: OffscreenCanvas[], title: string): HTMLCanvasElement;
935
+ /**
936
+ * Create a scatter plot
937
+ * @param data An array of data sets to plot
938
+ * @param chartSettings Chart settings
939
+ */
940
+ declare function CreateStackedChart(charts: QEChart[], title?: string, chartSettings?: QEChartSettings): HTMLCanvasElement;
941
+ declare function GetFunctionValues(callback: Function, range: number[], count: number): QEDataSet;
942
+ declare function QQPlotChart(data: number[], distribution?: string): HTMLCanvasElement;
763
943
  /** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
764
944
  */
765
945
  /**
@@ -859,4 +1039,4 @@ declare function VarianceComponents(ANOVA: any, data: GRR_Data): {
859
1039
  };
860
1040
  };
861
1041
 
862
- export { AnovaTableTwoWay, AverageMovingRange, Beta, Capability, Distributions, ERF, FixedPointIteration, G1, GRR, GRR_Data, GRR_Operator, GRR_Replication, GageEvaluation, Gamma, GoodnessOfFit, IndividualDistributionIdentification, Mean, Median, MovingRange, NewtonRaphson, QESpecification, QQPlot, Range, StDev, Sum, UnbiasingConstant, VarianceComponents };
1042
+ export { AnovaTableTwoWay, AverageMovingRange, Beta, CanvasDrawSettings, Capability, CreateBoxandWhiskerGraph, CreateCategoricalBarGraph, CreateContinuousBarGraph, CreateScatterPlot, CreateSplitGraph, CreateStackedChart, CreateSummaryChart, Distributions, ERF, EngFont, FixedPointIteration, G1, GRR, GRR_Data, GRR_Operator, GRR_Replication, GageEvaluation, Gamma, GetFunctionValues, GetHistogramDataset, GoodnessOfFit, IndividualDistributionIdentification, Margin, MarkOutOfControl, Mean, Median, MovingRange, NewtonRaphson, ObjectToArray, Point, QEAxisSettings, QEChart, QEChartSettings, QECustomGridline, QEDataCollection, QEDataSet, QELine, QESpecification, QQPlot, QQPlotChart, Range, RoundTO, SerializeData, StDev, Sum, UnbiasingConstant, VarianceComponents };
package/dist/index.d.ts CHANGED
@@ -27,6 +27,115 @@ declare class QESpecification {
27
27
  tolerance?: undefined;
28
28
  };
29
29
  SplitUnits(string: string): string[];
30
+ toString(): string;
31
+ }
32
+ declare class QEChartSettings {
33
+ constructor(xAxis?: QEAxisSettings, yAxis?: QEAxisSettings, width?: number, height?: number, margins?: Margin, chartArea?: CanvasDrawSettings, plotArea?: CanvasDrawSettings, title?: EngFont, hasLegend?: boolean, type?: string);
34
+ height: number;
35
+ width: number;
36
+ margins: Margin;
37
+ chartArea: CanvasDrawSettings;
38
+ plotArea: CanvasDrawSettings;
39
+ axis: {
40
+ x: QEAxisSettings;
41
+ y: QEAxisSettings;
42
+ };
43
+ title: EngFont;
44
+ hasLegend: boolean;
45
+ type: string;
46
+ }
47
+ declare class QEDataCollection {
48
+ constructor(name: string, data: any);
49
+ name: string;
50
+ data: any;
51
+ }
52
+ declare class CanvasDrawSettings {
53
+ constructor(fillColor?: string, strokeColor?: string, strokeWidth?: number, shape?: number, shapeRadius?: number);
54
+ fillColor: string;
55
+ strokeColor: string;
56
+ strokeWidth: number;
57
+ shape: number;
58
+ shapeRadius: number;
59
+ }
60
+ declare class QEAxisSettings {
61
+ constructor(min: number, max: number, name?: string, nameDisplay?: EngFont, count?: number, step?: number, scale?: string, padding?: Margin, strokeWidth?: number, strokeColor?: string, fillColor?: string, fontSize?: string, font?: string, textAlign?: string, labels?: string[], autoSize?: boolean, customGridlines?: QECustomGridline[], showAutoGridlines?: boolean, tickOnly?: boolean);
62
+ min: number;
63
+ max: number;
64
+ name: string;
65
+ nameDisplay: EngFont;
66
+ count: number;
67
+ step: number;
68
+ scale: string;
69
+ padding: Margin;
70
+ strokeWidth: number;
71
+ strokeColor: string;
72
+ fillColor: string;
73
+ fontSize: string;
74
+ font: string;
75
+ textAlign: string;
76
+ labels: string[];
77
+ autoSize: boolean;
78
+ customGridlines: QECustomGridline[];
79
+ showAutoGridlines: boolean;
80
+ tickOnly: boolean;
81
+ }
82
+ declare class QEChart {
83
+ constructor(data: QEDataSet[], type: string, title?: string, chartSettings?: QEChartSettings, plotFunction?: Function, functionInput?: {
84
+ min: number;
85
+ max: number;
86
+ count: number;
87
+ });
88
+ data: QEDataSet[];
89
+ type: string;
90
+ title: string;
91
+ chartSettings: QEChartSettings;
92
+ plotFunction: Function;
93
+ functionInput: {
94
+ min: number;
95
+ max: number;
96
+ count: number;
97
+ };
98
+ }
99
+ declare class QEDataSet {
100
+ constructor(values: Point[], name?: string, display?: CanvasDrawSettings, line?: QELine);
101
+ values: Point[];
102
+ name?: string;
103
+ display: CanvasDrawSettings;
104
+ line: QELine;
105
+ }
106
+ declare class QELine {
107
+ constructor(type?: string, display?: CanvasDrawSettings);
108
+ type?: string;
109
+ display: CanvasDrawSettings;
110
+ }
111
+ declare class QECustomGridline {
112
+ constructor(value: number, label?: string, display?: CanvasDrawSettings, font?: EngFont, opposite?: boolean, tickOnly?: boolean, dashed?: boolean);
113
+ value: number;
114
+ label: string;
115
+ display: CanvasDrawSettings;
116
+ font: EngFont;
117
+ opposite: boolean;
118
+ tickOnly: boolean;
119
+ dashed: boolean;
120
+ }
121
+ declare class Point {
122
+ constructor(x: number, y: number, display?: CanvasDrawSettings);
123
+ x: number;
124
+ y: number;
125
+ display: CanvasDrawSettings;
126
+ }
127
+ declare class Margin {
128
+ constructor(left: number, right: number, top: number, bottom: number);
129
+ left: number;
130
+ right: number;
131
+ top: number;
132
+ bottom: number;
133
+ }
134
+ declare class EngFont {
135
+ constructor(fillColor?: string, font?: string, fontSize?: string);
136
+ fillColor: string;
137
+ font: string;
138
+ fontSize: string;
30
139
  }
31
140
  declare class GRR_Data {
32
141
  constructor(operators: GRR_Operator[]);
@@ -54,6 +163,8 @@ declare class GRR_Replication {
54
163
  getPartsByIndex(index?: number): number[];
55
164
  getPartCount(): number;
56
165
  }
166
+ declare function ObjectToArray(object: any): any[];
167
+ declare function RoundTO(number: number, digits: number): number;
57
168
  /** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58
169
  */
59
170
  declare const Capability: {
@@ -760,6 +871,75 @@ declare const UnbiasingConstant: {
760
871
  d4?: undefined;
761
872
  })[];
762
873
  };
874
+ /**
875
+ * Return a serialized dataset
876
+ * @param data An array of data sets to plot
877
+ */
878
+ declare function SerializeData(data: number[]): QEDataSet;
879
+ /**
880
+ * Create a scatter plot
881
+ * @param data An array of data sets to plot
882
+ * @param chartSettings Chart settings
883
+ */
884
+ declare function CreateScatterPlot(data: QEDataSet[], title?: string, chartSettings?: QEChartSettings): HTMLCanvasElement;
885
+ /**
886
+ * Checks if data is out of control and marks out-of-control points
887
+ * @param data An array of data sets to check
888
+ * @param UCL Upper Control Limit
889
+ * @param LCL Lower Control Limit
890
+ * @param display Display settings for out-of-control points. DEFAULT: RED SQUARE
891
+ */
892
+ declare function MarkOutOfControl(data: QEDataSet, UCL: number, LCL: number, display?: CanvasDrawSettings): void;
893
+ /**
894
+ * Create a histogram
895
+ * @param data An array of data sets to plot
896
+ * @param title Title to display on chart
897
+ * @param bucketRange The difference between the high and low values of each bucket. If no value is provided the default will be StandardDeviation/3
898
+ * @param chartSettings Chart settings
899
+ */
900
+ declare function GetHistogramDataset(data: number[], title?: string, bucketRange?: number, chartSettings?: QEChartSettings): QEDataSet;
901
+ /**
902
+ * Create a bar graph
903
+ * @param data An array of data sets to plot
904
+ * @param chartSettings Chart settings
905
+ */
906
+ declare function CreateContinuousBarGraph(data: QEDataSet[], title?: string, chartSettings?: QEChartSettings, categoryLabels?: string[]): HTMLCanvasElement;
907
+ /**
908
+ * Create a bar graph
909
+ * @param data An array of data sets to plot
910
+ * @param title Chart Title
911
+ * @param chartSettings Chart settings
912
+ */
913
+ declare function CreateCategoricalBarGraph(data: QEDataCollection[], title?: string, chartSettings?: QEChartSettings): HTMLCanvasElement;
914
+ /**
915
+ * Create a bar graph
916
+ * @param data An array of data sets to plot
917
+ * @param title Chart Title
918
+ * @param chartSettings Chart settings
919
+ */
920
+ declare function CreateBoxandWhiskerGraph(data: QEDataSet[], title?: string, chartSettings?: QEChartSettings): HTMLCanvasElement;
921
+ /**
922
+ * Create a bar graph
923
+ * @param charts An array of charts to plot side by side
924
+ * @param title Chart Title
925
+ * @param chartSettings Chart settings
926
+ */
927
+ declare function CreateSplitGraph(charts: QEChart[], title: string, chartSettings?: QEChartSettings): HTMLCanvasElement;
928
+ /**
929
+ * Create a bar graph
930
+ * @param charts An array of charts to plot side by side
931
+ * @param title Chart Title
932
+ * @param chartSettings Chart settings
933
+ */
934
+ declare function CreateSummaryChart(charts: OffscreenCanvas[], title: string): HTMLCanvasElement;
935
+ /**
936
+ * Create a scatter plot
937
+ * @param data An array of data sets to plot
938
+ * @param chartSettings Chart settings
939
+ */
940
+ declare function CreateStackedChart(charts: QEChart[], title?: string, chartSettings?: QEChartSettings): HTMLCanvasElement;
941
+ declare function GetFunctionValues(callback: Function, range: number[], count: number): QEDataSet;
942
+ declare function QQPlotChart(data: number[], distribution?: string): HTMLCanvasElement;
763
943
  /** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
764
944
  */
765
945
  /**
@@ -859,4 +1039,4 @@ declare function VarianceComponents(ANOVA: any, data: GRR_Data): {
859
1039
  };
860
1040
  };
861
1041
 
862
- export { AnovaTableTwoWay, AverageMovingRange, Beta, Capability, Distributions, ERF, FixedPointIteration, G1, GRR, GRR_Data, GRR_Operator, GRR_Replication, GageEvaluation, Gamma, GoodnessOfFit, IndividualDistributionIdentification, Mean, Median, MovingRange, NewtonRaphson, QESpecification, QQPlot, Range, StDev, Sum, UnbiasingConstant, VarianceComponents };
1042
+ export { AnovaTableTwoWay, AverageMovingRange, Beta, CanvasDrawSettings, Capability, CreateBoxandWhiskerGraph, CreateCategoricalBarGraph, CreateContinuousBarGraph, CreateScatterPlot, CreateSplitGraph, CreateStackedChart, CreateSummaryChart, Distributions, ERF, EngFont, FixedPointIteration, G1, GRR, GRR_Data, GRR_Operator, GRR_Replication, GageEvaluation, Gamma, GetFunctionValues, GetHistogramDataset, GoodnessOfFit, IndividualDistributionIdentification, Margin, MarkOutOfControl, Mean, Median, MovingRange, NewtonRaphson, ObjectToArray, Point, QEAxisSettings, QEChart, QEChartSettings, QECustomGridline, QEDataCollection, QEDataSet, QELine, QESpecification, QQPlot, QQPlotChart, Range, RoundTO, SerializeData, StDev, Sum, UnbiasingConstant, VarianceComponents };