diff --git a/employee-app/health-monitor/environment/device-detail.html b/employee-app/health-monitor/environment/device-detail.html index e66fe8e..6ef5ecf 100644 --- a/employee-app/health-monitor/environment/device-detail.html +++ b/employee-app/health-monitor/environment/device-detail.html @@ -314,7 +314,7 @@ function genTrend(metricName, period) { 'TDS':{range:[100,850],unit:'mg/L'} }; - if (configs[metricName]) return { metricName: metricName, cfg: configs[metricName], period: period }; + if (configs[metricName]) return { metricName: metricName, cfg: configs[metricName], period: period, unit: '' }; var r = ranges[metricName]; if (!r) r = { range: [10, 100], unit: '' }; @@ -345,6 +345,7 @@ function genTrend(metricName, period) { return { metricName: metricName, + unit: r.unit || '', isAQI: false, yMax: maxVal, yTicks: Array.from({length: yTicks+1}, function(_, i) { var v = maxVal / yTicks * i; return r.unit === 'mg/m³' ? +v.toFixed(2) : Math.round(v);