qesuite 1.0.26 → 1.0.27

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/index.ts CHANGED
@@ -470,8 +470,14 @@ export function ObjectToArray(object: any){
470
470
  return returnArray;
471
471
  }
472
472
 
473
- export function RoundTO(number: number, digits: number){
474
- if(number === 0){return}
473
+ export function RoundTO(number: number, digits: number){
474
+ if(number === 0){
475
+ let str = number.toString();
476
+ for(let i = 0; i < digits; i++){
477
+ str.concat("0");
478
+ }
479
+ return str
480
+ }
475
481
  let str = number.toString();
476
482
  let decimalIndex = str.indexOf('.');
477
483
  let returner = Number(str.substring(0, decimalIndex + digits + 1));
@@ -750,11 +756,12 @@ export function CreateCapabilityPlot(data: number[], specification: Specificatio
750
756
  let capability = Capability.Analysis(data, specification);
751
757
 
752
758
  // Create Chart
753
- let chartSettings = new ChartSettings();
759
+ let chartSettings = new ChartSettings();
760
+ chartSettings.width = 1300;
754
761
  let canvas = CreateCanvas(chartSettings.width, chartSettings.height);
755
762
  let ctx = canvas.getContext("2d");
756
763
  if(!ctx){return canvas}
757
-
764
+ ctx.strokeRect(0,0,chartSettings.width, chartSettings.height)
758
765
  // Add Title
759
766
  AddChartTitle(ctx, chartSettings, "Capability Plot")
760
767
 
@@ -773,7 +780,7 @@ export function CreateCapabilityPlot(data: number[], specification: Specificatio
773
780
  value: capability.Cpk
774
781
  }
775
782
  ]
776
- AddInfoTable(ctx, withinInfo, 0, chartSettings.margins.top, chartSettings.width/4, chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom, "Within");
783
+ AddInfoTable(ctx, withinInfo, 20, chartSettings.margins.top, chartSettings.width/4, chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom, "Within");
777
784
 
778
785
  // Add Overall Information
779
786
  let overallInfo = [
@@ -790,7 +797,7 @@ export function CreateCapabilityPlot(data: number[], specification: Specificatio
790
797
  value: capability.Ppk
791
798
  }
792
799
  ]
793
- AddInfoTable(ctx, overallInfo, 3*chartSettings.width/4, chartSettings.margins.top, chartSettings.width/3, chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom, "Overall");
800
+ AddInfoTable(ctx, overallInfo, 3*chartSettings.width/4, chartSettings.margins.top, chartSettings.width/4, chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom, "Overall");
794
801
 
795
802
  const mean = Mean(data);
796
803
  // Add Overall Line Plot
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qesuite",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
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,2 @@
1
+ Fixed Bug in RoundTO() that caused 0 to return undefined.
2
+ Changed formatting in Capability.SixPack.CapabilityPlot to display the entire "overall table"