@c8y/ngx-components 1023.14.132 → 1023.14.135
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.
|
@@ -199,7 +199,8 @@ class YAxisService {
|
|
|
199
199
|
}
|
|
200
200
|
return new Intl.NumberFormat(this.intlNumberFormatCompliantLocale, {
|
|
201
201
|
notation: 'compact',
|
|
202
|
-
compactDisplay: 'short'
|
|
202
|
+
compactDisplay: 'short',
|
|
203
|
+
maximumFractionDigits: 3
|
|
203
204
|
}).format(val);
|
|
204
205
|
}
|
|
205
206
|
},
|
|
@@ -1686,13 +1687,23 @@ class ChartRealtimeService {
|
|
|
1686
1687
|
m.time,
|
|
1687
1688
|
m[datapoint.fragment][datapoint.series].value
|
|
1688
1689
|
]);
|
|
1690
|
+
newValues.sort(([a], [b]) => new Date(a).valueOf() - new Date(b).valueOf());
|
|
1689
1691
|
const datapointId = datapoint.__target?.id + datapoint.fragment + datapoint.series;
|
|
1690
1692
|
const seriesMatchingDatapoint = allDataSeries.find(s => s['datapointId'] === datapointId);
|
|
1691
1693
|
if (!seriesMatchingDatapoint) {
|
|
1692
1694
|
return;
|
|
1693
1695
|
}
|
|
1694
1696
|
const seriesDataToUpdate = seriesMatchingDatapoint['data'];
|
|
1695
|
-
seriesDataToUpdate.
|
|
1697
|
+
let lastExistingTimestamp = seriesDataToUpdate.length
|
|
1698
|
+
? new Date(seriesDataToUpdate[seriesDataToUpdate.length - 1][0]).valueOf()
|
|
1699
|
+
: -Infinity;
|
|
1700
|
+
for (const [timestamp, value] of newValues) {
|
|
1701
|
+
const ts = new Date(timestamp).valueOf();
|
|
1702
|
+
if (ts > lastExistingTimestamp) {
|
|
1703
|
+
seriesDataToUpdate.push([timestamp, value]);
|
|
1704
|
+
lastExistingTimestamp = ts;
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1696
1707
|
seriesMatchingDatapoint['data'] = this.removeValuesBeforeTimeRange(seriesMatchingDatapoint);
|
|
1697
1708
|
this.checkForValuesAfterTimeRange(seriesMatchingDatapoint['data'], datapoint, datapointOutOfSyncCallback);
|
|
1698
1709
|
});
|