From 2b6d281f7f0f22971a6d0b3bdfdfb880de4024e8 Mon Sep 17 00:00:00 2001 From: Felipe Bormann Date: Mon, 15 May 2017 20:08:18 -0300 Subject: [PATCH] monthly chart is now initialized when the user loads general report with the actual month being displayed --- dashboards/static/dashboards/js/behavior.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dashboards/static/dashboards/js/behavior.js b/dashboards/static/dashboards/js/behavior.js index 4e42c01..86c6e55 100644 --- a/dashboards/static/dashboards/js/behavior.js +++ b/dashboards/static/dashboards/js/behavior.js @@ -24,7 +24,13 @@ $(document).ready(function(){ }); - + //first call to month selector + $.get('/analytics/amount_active_users_per_day', {month: $('#month_selector option')[(new Date()).getMonth()].text }).done(function(data){ + $('#month_selector').val($('#month_selector option')[(new Date()).getMonth()].text); //update value to actual month + charts.month_heatmap(data, '#right-chart-body'); + }); + + }); -- libgit2 0.21.2