@nova-ui/dashboards 12.0.10-3652 → 12.0.10-3654
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/bundles/nova-ui-dashboards.umd.js +4 -3
- package/bundles/nova-ui-dashboards.umd.js.map +1 -1
- package/esm2015/lib/common/pipes/dashboard-unit-conversion-pipe.js +3 -3
- package/esm2015/lib/components/timeseries-widget/timeseries-scales.service.js +3 -3
- package/fesm2015/nova-ui-dashboards.js +3 -3
- package/fesm2015/nova-ui-dashboards.js.map +1 -1
- package/lib/common/pipes/dashboard-unit-conversion-pipe.d.ts +1 -1
- package/package.json +1 -1
- package/sdk/atoms/src/lib/common/pipes/dashboard-unit-conversion-pipe.d.ts +1 -1
- package/sdk/atoms/src/lib/common/pipes/dashboard-unit-conversion-pipe.js +2 -2
- package/sdk/atoms/src/lib/common/pipes/dashboard-unit-conversion-pipe.js.map +1 -1
- package/sdk/atoms/src/lib/components/timeseries-widget/timeseries-scales.service.js +1 -1
- package/sdk/atoms/src/lib/components/timeseries-widget/timeseries-scales.service.js.map +1 -1
|
@@ -457,10 +457,11 @@
|
|
|
457
457
|
*
|
|
458
458
|
* @returns The string representation of the converted value
|
|
459
459
|
*/
|
|
460
|
-
this.transform = function (value, units) {
|
|
460
|
+
this.transform = function (value, units, defaultThreshold) {
|
|
461
461
|
if (units === void 0) { units = "generic"; }
|
|
462
|
+
if (defaultThreshold === void 0) { defaultThreshold = DEFAULT_UNIT_CONVERSION_THRESHOLD; }
|
|
462
463
|
var valueAsNumber = typeof value === "string" ? parseFloat(value) : value;
|
|
463
|
-
if (valueAsNumber === undefined || isNaN(valueAsNumber) || valueAsNumber <
|
|
464
|
+
if (valueAsNumber === undefined || isNaN(valueAsNumber) || valueAsNumber < defaultThreshold) {
|
|
464
465
|
return (value === null || value === void 0 ? void 0 : value.toString()) || "";
|
|
465
466
|
}
|
|
466
467
|
var conversion = _this.unitConversionService.convert(valueAsNumber, (units === "bytes") ? i2.UnitBase.Bytes : i2.UnitBase.Standard, 1);
|
|
@@ -6584,7 +6585,7 @@
|
|
|
6584
6585
|
}
|
|
6585
6586
|
case exports.TimeseriesScaleType.Linear: {
|
|
6586
6587
|
scale = new i2$1.LinearScale();
|
|
6587
|
-
scale.formatters.tick = function (value) { return _this.unitConversionPipe.transform(value, units); };
|
|
6588
|
+
scale.formatters.tick = function (value) { return _this.unitConversionPipe.transform(value, units, i2.UnitBase.Standard); };
|
|
6588
6589
|
break;
|
|
6589
6590
|
}
|
|
6590
6591
|
case exports.TimeseriesScaleType.TimeInterval: {
|