From 9eca43801acddb9065dde5f83c83d7e8b51b93af Mon Sep 17 00:00:00 2001 From: John Wu Date: Mon, 28 Sep 2015 14:59:52 -0700 Subject: [PATCH] Fix: date range does not update in dashboard Replace the whole dateRange object in scope instead of changing min and max properties one-by-one. Given how angular `$watch` works with Moment.js object, I wrote some comment to clarify the right way to update dateRange. --- rd_ui/app/scripts/visualizations/chart.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rd_ui/app/scripts/visualizations/chart.js b/rd_ui/app/scripts/visualizations/chart.js index 7fed7937f..3f6afa519 100644 --- a/rd_ui/app/scripts/visualizations/chart.js +++ b/rd_ui/app/scripts/visualizations/chart.js @@ -78,8 +78,10 @@ } }); }); - $scope.dateRange.min = minDateRange; - $scope.dateRange.max = maxDateRange; + $scope.dateRange = { + min: minDateRange, + max: maxDateRange + }; } }; };