qesuite 1.0.39 → 1.0.40

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.js CHANGED
@@ -3194,7 +3194,9 @@ function CreateScatterPlot(data, title, chartSettings) {
3194
3194
  }
3195
3195
  function MarkOutOfControl(data, UCL, LCL, CL, std, display = new CanvasDrawSettings("red", "red", 1, 1), controlTests = [1]) {
3196
3196
  if (CL === void 0) {
3197
- CL = Mean([LCL, UCL]);
3197
+ CL = Mean(data.values.map((v) => {
3198
+ return v.y;
3199
+ }));
3198
3200
  }
3199
3201
  if (std === void 0) {
3200
3202
  std = (CL - LCL) / 3;
package/dist/index.mjs CHANGED
@@ -3107,7 +3107,9 @@ function CreateScatterPlot(data, title, chartSettings) {
3107
3107
  }
3108
3108
  function MarkOutOfControl(data, UCL, LCL, CL, std, display = new CanvasDrawSettings("red", "red", 1, 1), controlTests = [1]) {
3109
3109
  if (CL === void 0) {
3110
- CL = Mean([LCL, UCL]);
3110
+ CL = Mean(data.values.map((v) => {
3111
+ return v.y;
3112
+ }));
3111
3113
  }
3112
3114
  if (std === void 0) {
3113
3115
  std = (CL - LCL) / 3;
package/index.ts CHANGED
@@ -3575,7 +3575,7 @@ export function CreateScatterPlot(data: DataSet[], title?: string, chartSettings
3575
3575
  * @param display Display settings for out-of-control points. DEFAULT: RED SQUARE
3576
3576
  */
3577
3577
  function MarkOutOfControl(data: DataSet, UCL: number, LCL: number, CL?: any, std?: any, display = new CanvasDrawSettings("red", "red", 1, 1), controlTests: number[] = [1]) {
3578
- if(CL === undefined){CL = Mean([LCL, UCL])}
3578
+ if(CL === undefined){CL = Mean(data.values.map(v => {return v.y}))}
3579
3579
  if(std === undefined){std = (CL - LCL)/3}
3580
3580
  let Test2 = 0;
3581
3581
  let Test3 = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qesuite",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "Performs advanced statistical analysis of data. Specifically designed for engineering statistical analysis",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -0,0 +1 @@
1
+ - fixed bug in control chart that calculated CL as Mean(UCL, LCL) now CL = Mean(data)