diff --git a/api/profile.php b/api/profile.php index 3fc28c5..2e3641d 100644 --- a/api/profile.php +++ b/api/profile.php @@ -960,8 +960,8 @@ class profile extends cora\api { $intercept = (($sum_y) - ($slope * $sum_x)) / ($n); return [ - 'slope' => round($slope, 2), - 'intercept' => round($intercept, 2) + 'slope' => round($slope, 4), + 'intercept' => round($intercept, 4) ]; } } diff --git a/js/component/card/temperature_profiles.js b/js/component/card/temperature_profiles.js index 0a58daa..c881a2c 100644 --- a/js/component/card/temperature_profiles.js +++ b/js/component/card/temperature_profiles.js @@ -145,6 +145,9 @@ beestat.component.card.temperature_profiles.prototype.get_data_ = function() { /** * Get a linear trendline from a set of data. * + * IMPORTANT: This exists in the profile already but it's wrong to use it + * directly as it's not right for Celsius. + * * @param {Object} data The data; at least two points required. * * @return {Object} The slope and intercept of the trendline.