qesuite 1.0.13 → 1.0.14

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
@@ -2172,20 +2172,6 @@ function CreateCanvas(width, height) {
2172
2172
  canvas.width = width;
2173
2173
  return canvas;
2174
2174
  }
2175
- function AddSolidBackground(canvas, color) {
2176
- let newCanvas = CreateCanvas(canvas.width + 100, canvas.height);
2177
- let newCtx = newCanvas.getContext("2d");
2178
- if (newCtx) {
2179
- newCtx.beginPath();
2180
- newCtx.fillStyle = color;
2181
- newCtx.fillRect(0, 0, newCanvas.height + 100, newCanvas.width + 100);
2182
- newCtx.closePath();
2183
- newCtx.beginPath();
2184
- newCtx.drawImage(canvas, 50, 0);
2185
- newCtx.closePath();
2186
- }
2187
- return newCanvas;
2188
- }
2189
2175
  function AddPlotArea(ctx, chartSettings) {
2190
2176
  let width = chartSettings.width - chartSettings.margins.left - chartSettings.margins.right;
2191
2177
  let height = chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom;
@@ -2951,7 +2937,10 @@ function CreateSummaryChart(charts, title) {
2951
2937
  if (!ctx) {
2952
2938
  return canvas;
2953
2939
  }
2940
+ ctx.fillStyle = "white";
2941
+ ctx.fillRect(0, 0, width + padding, height + 250);
2954
2942
  let fontsize = 96;
2943
+ ctx.fillStyle = "black";
2955
2944
  ctx.font = `${fontsize}px calibri`;
2956
2945
  ctx.textAlign = "center";
2957
2946
  let lines = getLines(ctx, title, width);
@@ -2971,8 +2960,7 @@ function CreateSummaryChart(charts, title) {
2971
2960
  ctx.drawImage(charts[2 * i + 1], width / 2 + padding, y, width / 2, height / rowCount - padding);
2972
2961
  }
2973
2962
  }
2974
- let newCanvas = AddSolidBackground(canvas, "white");
2975
- return newCanvas;
2963
+ return canvas;
2976
2964
  }
2977
2965
  function getLines(ctx, text, maxWidth) {
2978
2966
  var words = text.split(" ");
package/dist/index.mjs CHANGED
@@ -2085,20 +2085,6 @@ function CreateCanvas(width, height) {
2085
2085
  canvas.width = width;
2086
2086
  return canvas;
2087
2087
  }
2088
- function AddSolidBackground(canvas, color) {
2089
- let newCanvas = CreateCanvas(canvas.width + 100, canvas.height);
2090
- let newCtx = newCanvas.getContext("2d");
2091
- if (newCtx) {
2092
- newCtx.beginPath();
2093
- newCtx.fillStyle = color;
2094
- newCtx.fillRect(0, 0, newCanvas.height + 100, newCanvas.width + 100);
2095
- newCtx.closePath();
2096
- newCtx.beginPath();
2097
- newCtx.drawImage(canvas, 50, 0);
2098
- newCtx.closePath();
2099
- }
2100
- return newCanvas;
2101
- }
2102
2088
  function AddPlotArea(ctx, chartSettings) {
2103
2089
  let width = chartSettings.width - chartSettings.margins.left - chartSettings.margins.right;
2104
2090
  let height = chartSettings.height - chartSettings.margins.top - chartSettings.margins.bottom;
@@ -2864,7 +2850,10 @@ function CreateSummaryChart(charts, title) {
2864
2850
  if (!ctx) {
2865
2851
  return canvas;
2866
2852
  }
2853
+ ctx.fillStyle = "white";
2854
+ ctx.fillRect(0, 0, width + padding, height + 250);
2867
2855
  let fontsize = 96;
2856
+ ctx.fillStyle = "black";
2868
2857
  ctx.font = `${fontsize}px calibri`;
2869
2858
  ctx.textAlign = "center";
2870
2859
  let lines = getLines(ctx, title, width);
@@ -2884,8 +2873,7 @@ function CreateSummaryChart(charts, title) {
2884
2873
  ctx.drawImage(charts[2 * i + 1], width / 2 + padding, y, width / 2, height / rowCount - padding);
2885
2874
  }
2886
2875
  }
2887
- let newCanvas = AddSolidBackground(canvas, "white");
2888
- return newCanvas;
2876
+ return canvas;
2889
2877
  }
2890
2878
  function getLines(ctx, text, maxWidth) {
2891
2879
  var words = text.split(" ");
package/index.ts CHANGED
@@ -3375,8 +3375,13 @@ export function CreateSummaryChart(charts: HTMLCanvasElement[], title: string){
3375
3375
  let ctx = canvas.getContext('2d');
3376
3376
 
3377
3377
  if(!ctx){return canvas}
3378
+ // Add Solid White Background
3379
+ ctx.fillStyle = "white"
3380
+ ctx.fillRect(0, 0, width + padding, height + 250);
3381
+
3378
3382
 
3379
3383
  let fontsize = 96;
3384
+ ctx.fillStyle = "black"
3380
3385
  ctx.font = `${fontsize}px calibri`;
3381
3386
  ctx.textAlign ='center';
3382
3387
  let lines: string[] = getLines(ctx, title, width);
@@ -3399,8 +3404,7 @@ export function CreateSummaryChart(charts: HTMLCanvasElement[], title: string){
3399
3404
  }
3400
3405
  }
3401
3406
 
3402
- let newCanvas = AddSolidBackground(canvas, 'white');
3403
- return newCanvas;
3407
+ return canvas;
3404
3408
  }
3405
3409
 
3406
3410
  function getLines(ctx: any, text: string, maxWidth: number) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qesuite",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
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
+ Removed AddSolidBackground from summary chart and replaced with a ctx.fillRect() call