@measurequick/measurequick-report-generator 1.0.30 → 1.0.31
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.js +8 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -85,7 +85,7 @@ function printBodyData(geolocationMap) {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
function printSingleBodySection(dataPoints, xLeft, xRight, y) {
|
|
88
|
-
var yTop = y;
|
|
88
|
+
var yTop = y + .22;
|
|
89
89
|
var s = .2;
|
|
90
90
|
var dataPoint;
|
|
91
91
|
var val;
|
|
@@ -113,9 +113,11 @@ function printSingleBodySection(dataPoints, xLeft, xRight, y) {
|
|
|
113
113
|
} else {
|
|
114
114
|
dataPoint = dataPoints[key];
|
|
115
115
|
val = reportData.values[key];
|
|
116
|
-
units =
|
|
116
|
+
units = "";
|
|
117
|
+
if (dataPoint.hasOwnProperty("units"))
|
|
118
|
+
units = Array.isArray(dataPoint.units) ? ` (${dataPoint.units[0]} / ${dataPoint.units[1]})` : ` (${dataPoint.units})`;
|
|
117
119
|
text = dataPoint.hasOwnProperty("secondaryValue") ? `${val} / ${reportData.values[dataPoint.secondaryValue]}` : val;
|
|
118
|
-
doc.text(`${dataPoint.label}
|
|
120
|
+
doc.text(`${dataPoint.label}${units}:`, xLeft, y);
|
|
119
121
|
doc.text(text, alignRight(text, xRight, 8), y);
|
|
120
122
|
doc.addImage(graphics[reportData.rangeIcons[key]], "JPEG", xRight + .05, y - .12, .16, .16);
|
|
121
123
|
doc.addImage(graphics[reportData.toolIcons[key]], "JPEG", xRight+.25, y - .12, .16, .16);
|
|
@@ -144,10 +146,10 @@ function printFooterData(techName, profilePicture, companyLogo) {
|
|
|
144
146
|
if (companyLogo) printCompanyLogo("footer", companyLogo);
|
|
145
147
|
doc.setTextColor(255, 255, 255);
|
|
146
148
|
var s = .2;
|
|
147
|
-
var x =
|
|
148
|
-
var y =
|
|
149
|
+
var x = .2;
|
|
150
|
+
var y = 8;
|
|
149
151
|
var key;
|
|
150
|
-
for (let key in
|
|
152
|
+
for (let key in templates.footerData) {
|
|
151
153
|
doc.text(`${reportData.footerData[key]}`, x, y);
|
|
152
154
|
y += s;
|
|
153
155
|
}
|