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
UI updates: or-chart changed fallback datapoint count from 10 to 100. Fixes #1075 (#1113)
Martin Peeterse7797d588b8a
diff --git a/ui/component/or-chart/src/index.ts b/ui/component/or-chart/src/index.tsindex 48173bdba..9fb0f252d 100644--- a/ui/component/or-chart/src/index.ts+++ b/ui/component/or-chart/src/index.ts@@ -1072,7 +1072,7 @@ export class OrChart extends translate(i18next)(LitElement) {if(this._chartElem.clientWidth == 0) {console.error("Could not grab width of the Chart for estimating amount of datapoints. Using 10 points instead.")}- query.amountOfPoints = (this._chartElem.clientWidth == 0) ? 10 : Math.round(this._chartElem.clientWidth / 10); // set amount of datapoints based on current chart width.+ query.amountOfPoints = (this._chartElem.clientWidth == 0) ? 100 : Math.round(this._chartElem.clientWidth / 10); // set amount of datapoints based on current chart width.} else if(query.type == 'interval') {const diffInHours = (this.datapointQuery.toTimestamp! - this.datapointQuery.fromTimestamp!) / 1000 / 60 / 60;const intervalArr = this._getInterval(diffInHours);