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
destroy chart instance when component is disconnected
Vincent41dfff4b49f2
diff --git a/ui/component/or-attribute-card/src/index.ts b/ui/component/or-attribute-card/src/index.tsindex 9797ae950..9a66d3bc7 100644--- a/ui/component/or-attribute-card/src/index.ts+++ b/ui/component/or-attribute-card/src/index.ts@@ -205,6 +205,18 @@ export class OrAttributeCard extends LitElement {}+ disconnectedCallback(): void {+ super.disconnectedCallback();+ this._cleanup();+ }++ protected _cleanup() {+ if (this._chart) {+ this._chart.destroy();+ this._chart = undefined;+ }+ }+protected render() {if (this.assetId === "" || this.attributeName === "") {