pace-table-lib 1.0.49 → 1.0.50
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.
|
@@ -8307,7 +8307,10 @@ function getPercentageBy(dataValue, totalValue) {
|
|
|
8307
8307
|
const den = Number(totalValue);
|
|
8308
8308
|
if (isNaN(num) || isNaN(den)) return num;
|
|
8309
8309
|
if (den === 0) return num;
|
|
8310
|
-
|
|
8310
|
+
let percentage = num / den;
|
|
8311
|
+
if (Math.abs(percentage) < 1e-10) {
|
|
8312
|
+
percentage = 0;
|
|
8313
|
+
}
|
|
8311
8314
|
return percentage;
|
|
8312
8315
|
}
|
|
8313
8316
|
function createBorder(bWidth, bType, bColor) {
|