qesuite 1.0.46 → 1.0.47

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
@@ -3753,7 +3753,7 @@ function CreateControlChart(data, chartTitle, UCL, LCL, controlTests) {
3753
3753
  LCL = centerline - 3 * std;
3754
3754
  }
3755
3755
  let dataSet = new DataSet(data.map((d, i) => {
3756
- return new Point(i, d);
3756
+ return new Point(i + 1, d);
3757
3757
  }));
3758
3758
  dataSet.line.type = "straight";
3759
3759
  let customGridlines = [
@@ -3763,6 +3763,10 @@ function CreateControlChart(data, chartTitle, UCL, LCL, controlTests) {
3763
3763
  ];
3764
3764
  let chartSettings = new ChartSettings();
3765
3765
  chartSettings.axis.y.customGridlines = customGridlines;
3766
+ chartSettings.axis.x.min = 0;
3767
+ chartSettings.axis.x.max = data.length + 1;
3768
+ chartSettings.axis.x.step = Math.round(Math.log10(data.length)) * 5;
3769
+ chartSettings.axis.x.tickOnly = true;
3766
3770
  MarkOutOfControl(dataSet, UCL, LCL, centerline, std, void 0, controlTests);
3767
3771
  let graph = CreateScatterPlot([dataSet], chartTitle, chartSettings);
3768
3772
  return graph;
package/dist/index.mjs CHANGED
@@ -3666,7 +3666,7 @@ function CreateControlChart(data, chartTitle, UCL, LCL, controlTests) {
3666
3666
  LCL = centerline - 3 * std;
3667
3667
  }
3668
3668
  let dataSet = new DataSet(data.map((d, i) => {
3669
- return new Point(i, d);
3669
+ return new Point(i + 1, d);
3670
3670
  }));
3671
3671
  dataSet.line.type = "straight";
3672
3672
  let customGridlines = [
@@ -3676,6 +3676,10 @@ function CreateControlChart(data, chartTitle, UCL, LCL, controlTests) {
3676
3676
  ];
3677
3677
  let chartSettings = new ChartSettings();
3678
3678
  chartSettings.axis.y.customGridlines = customGridlines;
3679
+ chartSettings.axis.x.min = 0;
3680
+ chartSettings.axis.x.max = data.length + 1;
3681
+ chartSettings.axis.x.step = Math.round(Math.log10(data.length)) * 5;
3682
+ chartSettings.axis.x.tickOnly = true;
3679
3683
  MarkOutOfControl(dataSet, UCL, LCL, centerline, std, void 0, controlTests);
3680
3684
  let graph = CreateScatterPlot([dataSet], chartTitle, chartSettings);
3681
3685
  return graph;
package/index.ts CHANGED
@@ -4279,7 +4279,7 @@ export function CreateControlChart(data: number[], chartTitle?: string, UCL?: nu
4279
4279
  if(LCL === undefined){
4280
4280
  LCL = centerline - 3 * std;
4281
4281
  }
4282
- let dataSet = new DataSet(data.map((d,i) => {return new Point(i,d)}));
4282
+ let dataSet = new DataSet(data.map((d,i) => {return new Point(i+1,d)}));
4283
4283
  dataSet.line.type = "straight";
4284
4284
  let customGridlines = [
4285
4285
  new CustomGridline(centerline, `x\u0304 = ${Math.round(centerline * 1e3) / 1e3}`, new CanvasDrawSettings("", "green"), void 0, true),
@@ -4288,6 +4288,10 @@ export function CreateControlChart(data: number[], chartTitle?: string, UCL?: nu
4288
4288
  ];
4289
4289
  let chartSettings = new ChartSettings();
4290
4290
  chartSettings.axis.y.customGridlines = customGridlines;
4291
+ chartSettings.axis.x.min = 0;
4292
+ chartSettings.axis.x.max = data.length + 1;
4293
+ chartSettings.axis.x.step = Math.round(Math.log10(data.length))*5;
4294
+ chartSettings.axis.x.tickOnly = true;
4291
4295
 
4292
4296
  MarkOutOfControl(dataSet, UCL, LCL, centerline, std,undefined,controlTests);
4293
4297
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qesuite",
3
- "version": "1.0.46",
3
+ "version": "1.0.47",
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
+ - Make X axis integers on control charts to show the index of measurements