raain-app 3.2.1 → 3.2.2
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/fesm2020/raain-app.mjs
CHANGED
|
@@ -1418,7 +1418,7 @@ class CompareManager {
|
|
|
1418
1418
|
if (!this.buildCompares?.compareCumulative) {
|
|
1419
1419
|
return new XYType(0, 0);
|
|
1420
1420
|
}
|
|
1421
|
-
const maxValue = this.buildCompares.compareCumulative.maxValue * 1.2;
|
|
1421
|
+
const maxValue = Math.max(this.buildCompares.compareCumulative.maxValue * 1.2, 1);
|
|
1422
1422
|
return new XYType(maxValue, maxValue);
|
|
1423
1423
|
}
|
|
1424
1424
|
// Default: KGE normalized 0-1 (from raain-model defaults)
|
|
@@ -1477,7 +1477,7 @@ class CompareManager {
|
|
|
1477
1477
|
date: c.date,
|
|
1478
1478
|
name: c.name,
|
|
1479
1479
|
comparePoints: c.qualityPoints.map((p) => new XYType(p.getGaugeValue(), p.getRainValue(), 2, p.gaugeLabel, p.gaugeId)),
|
|
1480
|
-
comparePointsMax: new XYType(c.maxValue * 1.2, c.maxValue * 1.2),
|
|
1480
|
+
comparePointsMax: new XYType(Math.max(c.maxValue * 1.2, 1), Math.max(c.maxValue * 1.2, 1)),
|
|
1481
1481
|
comparePointsHistory: c.qualityPointsLegacy,
|
|
1482
1482
|
remarks: c.remarks,
|
|
1483
1483
|
qualityIndicator,
|
|
@@ -1503,7 +1503,7 @@ class CompareManager {
|
|
|
1503
1503
|
return;
|
|
1504
1504
|
}
|
|
1505
1505
|
const countForAverage = targetsOrdered.length;
|
|
1506
|
-
const maxValue = this.buildCompares.compareCumulative.maxValue * 1.2;
|
|
1506
|
+
const maxValue = Math.max(this.buildCompares.compareCumulative.maxValue * 1.2, 1);
|
|
1507
1507
|
const cumulativePoints = this.buildCompares.compareCumulative.qualityPoints.map((qp) => new XYType(qp.getGaugeValue(), qp.getRainValue(), 2, qp.gaugeLabel, qp.gaugeId));
|
|
1508
1508
|
const cumulativePointsMax = new XYType(maxValue, maxValue);
|
|
1509
1509
|
// Default: KGE normalized 0-1
|