qesuite 1.0.72 → 1.0.73

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
@@ -1724,10 +1724,16 @@ function CreateCapabilityPlot(data, specification, target, subgroupSize, confide
1724
1724
  ];
1725
1725
  AddInfoTable(ctx, overallInfo, 3 * chartSettings.width / 4, chartSettings.margins.top, chartSettings.width / 4, chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom, "Overall");
1726
1726
  const mean = Mean(data);
1727
- let plotMin = !isNaN(specification.LSL) ? specification.LSL : Math.max(mean - 3 * overallInfo[0].value, mean + 3 * overallInfo[0].value, mean - 3 * withinInfo[0].value, mean + 3 * withinInfo[0].value);
1728
- let plotMax = !isNaN(specification.USL) ? specification.USL : Math.min(mean - 3 * overallInfo[0].value, mean + 3 * overallInfo[0].value, mean - 3 * withinInfo[0].value, mean + 3 * withinInfo[0].value);
1729
- AddLinePlot(ctx, plotMin, plotMax, mean, [mean - 3 * overallInfo[0].value, mean + 3 * overallInfo[0].value], chartSettings.width / 4 + 25, chartSettings.margins.top, chartSettings.width / 2 - 50, (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3 - 10, "Overall");
1730
- AddLinePlot(ctx, plotMin, plotMax, mean, [mean - 3 * withinInfo[0].value, mean + 3 * withinInfo[0].value], chartSettings.width / 4 + 25, chartSettings.margins.top + 40 + (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3, chartSettings.width / 2 - 50, (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3 - 10, "Within");
1727
+ let overallMin = mean - 3 * overallInfo[0].value;
1728
+ let overallMax = mean + 3 * overallInfo[0].value;
1729
+ let withinMin = mean - 3 * withinInfo[0].value;
1730
+ let withinMax = mean + 3 * withinInfo[0].value;
1731
+ let allMin = Math.min(mean, overallMin, overallMax, withinMin, withinMax, specification.LSL, specification.USL);
1732
+ let allMax = Math.max(mean, overallMin, overallMax, withinMin, withinMax, specification.LSL, specification.USL);
1733
+ let plotMin = allMin - (allMax - allMin) / 10;
1734
+ let plotMax = allMax + (allMax - allMin) / 10;
1735
+ AddLinePlot(ctx, plotMin, plotMax, mean, [overallMin, overallMax], chartSettings.width / 4 + 25, chartSettings.margins.top, chartSettings.width / 2 - 50, (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3 - 10, "Overall");
1736
+ AddLinePlot(ctx, plotMin, plotMax, mean, [withinMin, withinMax], chartSettings.width / 4 + 25, chartSettings.margins.top + 40 + (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3, chartSettings.width / 2 - 50, (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3 - 10, "Within");
1731
1737
  AddLinePlot(ctx, plotMin, plotMax, mean, [specification.LSL, specification.USL], chartSettings.width / 4 + 25, chartSettings.margins.top + 80 + 2 * (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3, chartSettings.width / 2 - 50, (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3 - 10, "Specs");
1732
1738
  return canvas;
1733
1739
  }
package/dist/index.mjs CHANGED
@@ -1598,10 +1598,16 @@ function CreateCapabilityPlot(data, specification, target, subgroupSize, confide
1598
1598
  ];
1599
1599
  AddInfoTable(ctx, overallInfo, 3 * chartSettings.width / 4, chartSettings.margins.top, chartSettings.width / 4, chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom, "Overall");
1600
1600
  const mean = Mean(data);
1601
- let plotMin = !isNaN(specification.LSL) ? specification.LSL : Math.max(mean - 3 * overallInfo[0].value, mean + 3 * overallInfo[0].value, mean - 3 * withinInfo[0].value, mean + 3 * withinInfo[0].value);
1602
- let plotMax = !isNaN(specification.USL) ? specification.USL : Math.min(mean - 3 * overallInfo[0].value, mean + 3 * overallInfo[0].value, mean - 3 * withinInfo[0].value, mean + 3 * withinInfo[0].value);
1603
- AddLinePlot(ctx, plotMin, plotMax, mean, [mean - 3 * overallInfo[0].value, mean + 3 * overallInfo[0].value], chartSettings.width / 4 + 25, chartSettings.margins.top, chartSettings.width / 2 - 50, (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3 - 10, "Overall");
1604
- AddLinePlot(ctx, plotMin, plotMax, mean, [mean - 3 * withinInfo[0].value, mean + 3 * withinInfo[0].value], chartSettings.width / 4 + 25, chartSettings.margins.top + 40 + (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3, chartSettings.width / 2 - 50, (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3 - 10, "Within");
1601
+ let overallMin = mean - 3 * overallInfo[0].value;
1602
+ let overallMax = mean + 3 * overallInfo[0].value;
1603
+ let withinMin = mean - 3 * withinInfo[0].value;
1604
+ let withinMax = mean + 3 * withinInfo[0].value;
1605
+ let allMin = Math.min(mean, overallMin, overallMax, withinMin, withinMax, specification.LSL, specification.USL);
1606
+ let allMax = Math.max(mean, overallMin, overallMax, withinMin, withinMax, specification.LSL, specification.USL);
1607
+ let plotMin = allMin - (allMax - allMin) / 10;
1608
+ let plotMax = allMax + (allMax - allMin) / 10;
1609
+ AddLinePlot(ctx, plotMin, plotMax, mean, [overallMin, overallMax], chartSettings.width / 4 + 25, chartSettings.margins.top, chartSettings.width / 2 - 50, (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3 - 10, "Overall");
1610
+ AddLinePlot(ctx, plotMin, plotMax, mean, [withinMin, withinMax], chartSettings.width / 4 + 25, chartSettings.margins.top + 40 + (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3, chartSettings.width / 2 - 50, (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3 - 10, "Within");
1605
1611
  AddLinePlot(ctx, plotMin, plotMax, mean, [specification.LSL, specification.USL], chartSettings.width / 4 + 25, chartSettings.margins.top + 80 + 2 * (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3, chartSettings.width / 2 - 50, (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3 - 10, "Specs");
1606
1612
  return canvas;
1607
1613
  }
package/index.ts CHANGED
@@ -1803,14 +1803,20 @@ export function CreateCapabilityPlot(data: number[], specification: Specificatio
1803
1803
  AddInfoTable(ctx, overallInfo, 3*chartSettings.width/4, chartSettings.margins.top, chartSettings.width/4, chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom, "Overall");
1804
1804
 
1805
1805
  const mean = Mean(data);
1806
- let plotMin = !isNaN(specification.LSL) ? specification.LSL : Math.max(mean - 3 * overallInfo[0].value, mean + 3 * overallInfo[0].value, mean - 3 * withinInfo[0].value, mean + 3 * withinInfo[0].value);
1807
- let plotMax = !isNaN(specification.USL) ? specification.USL : Math.min(mean - 3 * overallInfo[0].value, mean + 3 * overallInfo[0].value, mean - 3 * withinInfo[0].value, mean + 3 * withinInfo[0].value);
1808
-
1806
+ let overallMin = mean - 3 * overallInfo[0].value;
1807
+ let overallMax = mean + 3 * overallInfo[0].value;
1808
+ let withinMin = mean - 3 * withinInfo[0].value;
1809
+ let withinMax = mean + 3 * withinInfo[0].value;
1810
+ let allMin = Math.min(mean, overallMin, overallMax, withinMin, withinMax, specification.LSL, specification.USL);
1811
+ let allMax = Math.max(mean, overallMin, overallMax, withinMin, withinMax, specification.LSL, specification.USL);
1812
+ let plotMin = allMin - (allMax - allMin)/10;
1813
+ let plotMax = allMax + (allMax - allMin)/10;
1814
+
1809
1815
  // Add Overall Line Plot
1810
- AddLinePlot(ctx, plotMin, plotMax, mean, [mean - 3 * overallInfo[0].value, mean + 3 * overallInfo[0].value], chartSettings.width / 4 + 25, chartSettings.margins.top, chartSettings.width / 2 - 50, (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3 - 10, "Overall");
1816
+ AddLinePlot(ctx, plotMin, plotMax, mean, [overallMin, overallMax], chartSettings.width / 4 + 25, chartSettings.margins.top, chartSettings.width / 2 - 50, (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3 - 10, "Overall");
1811
1817
 
1812
1818
  // Add Within Line Plot
1813
- AddLinePlot(ctx, plotMin, plotMax, mean, [mean - 3 * withinInfo[0].value, mean + 3 * withinInfo[0].value], chartSettings.width / 4 + 25, chartSettings.margins.top + 40 + (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3, chartSettings.width / 2 - 50, (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3 - 10, "Within");
1819
+ AddLinePlot(ctx, plotMin, plotMax, mean, [withinMin, withinMax], chartSettings.width / 4 + 25, chartSettings.margins.top + 40 + (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3, chartSettings.width / 2 - 50, (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3 - 10, "Within");
1814
1820
 
1815
1821
  // Add Specs Line Plot
1816
1822
  AddLinePlot(ctx, plotMin, plotMax, mean, [specification.LSL, specification.USL], chartSettings.width / 4 + 25, chartSettings.margins.top + 80 + 2 * (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3, chartSettings.width / 2 - 50, (chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom) / 3 - 10, "Specs");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qesuite",
3
- "version": "1.0.72",
3
+ "version": "1.0.73",
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
+ - prevented capility plot from overflowing