From 9b40c81b857935ce0711e60505a40c0a7e616e82 Mon Sep 17 00:00:00 2001 From: Jon Ziebell Date: Tue, 21 Nov 2023 22:56:56 -0500 Subject: [PATCH] Fixed degree days off by a factor of 10 --- api/runtime_thermostat_summary.php | 2 ++ js/component/chart/runtime_thermostat_summary.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/runtime_thermostat_summary.php b/api/runtime_thermostat_summary.php index d9c0168..4b0f922 100755 --- a/api/runtime_thermostat_summary.php +++ b/api/runtime_thermostat_summary.php @@ -88,6 +88,8 @@ class runtime_thermostat_summary extends cora\crud { $runtime_thermostat_summary['min_outdoor_temperature'] /= 10; $runtime_thermostat_summary['max_outdoor_temperature'] /= 10; $runtime_thermostat_summary['avg_indoor_temperature'] /= 10; + $runtime_thermostat_summary['sum_heating_degree_days'] /= 10; + $runtime_thermostat_summary['sum_cooling_degree_days'] /= 10; } return $runtime_thermostat_summaries; diff --git a/js/component/chart/runtime_thermostat_summary.js b/js/component/chart/runtime_thermostat_summary.js index 18dbd00..c822119 100755 --- a/js/component/chart/runtime_thermostat_summary.js +++ b/js/component/chart/runtime_thermostat_summary.js @@ -323,12 +323,12 @@ beestat.component.chart.runtime_thermostat_summary.prototype.get_options_tooltip case 'sum_heating_degree_days': label = beestat.series.sum_heating_degree_days.name; color = point.series.color; - value = Math.round(values.sum_heating_degree_days).toLocaleString(); + value = values.sum_heating_degree_days.toFixed(1).toLocaleString(); break; case 'sum_cooling_degree_days': label = beestat.series.sum_cooling_degree_days.name; color = point.series.color; - value = Math.round(values.sum_cooling_degree_days).toLocaleString(); + value = values.sum_cooling_degree_days.toFixed(1).toLocaleString(); break; default: label = beestat.series[point.series.name].name;