100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
if there's no measurement for the last data point, use the highest available
Vincenta0a87509ed6e
diff --git a/ui/component/or-attribute-card/src/index.ts b/ui/component/or-attribute-card/src/index.tsindex ec6f2ef62..ec1f10cea 100644--- a/ui/component/or-attribute-card/src/index.ts+++ b/ui/component/or-attribute-card/src/index.ts@@ -333,6 +333,11 @@ export class OrAttributeCard extends LitElement {data[0].y = 0;}+ // if there's no measurement for the last data point, use the highest available+ if (data[(data.length - 1)] && !data[(data.length - 1)].y) {+ data[(data.length - 1)].y = this.getHighestValue(data);+ }+return data;}