From 9bf422c3ee7131e5de8d291db688b9dc409b55de Mon Sep 17 00:00:00 2001 From: Felipe Bormann Date: Mon, 15 May 2017 20:31:20 -0300 Subject: [PATCH] added instant loading for weekly chart --- dashboards/static/dashboards/js/behavior.js | 7 +++++++ 1 file changed, 7 insertions(+), 0 deletions(-) diff --git a/dashboards/static/dashboards/js/behavior.js b/dashboards/static/dashboards/js/behavior.js index b3ad6b5..64c9348 100644 --- a/dashboards/static/dashboards/js/behavior.js +++ b/dashboards/static/dashboards/js/behavior.js @@ -30,6 +30,13 @@ $(document).ready(function(){ charts.month_heatmap(data, '#right-chart-body'); }); + //first call to weekly chart + var today_date = new Date(); + var date = (today_date.getMonth() + 1) + '/' + today_date.getDate() + '/' + today_date.getFullYear(); + $.get('/analytics/get_days_of_the_week_log', {date: date}).done(function(data){ + charts.month_heatmap(data, '#bottom-right-chart-body', '#weekly-chart'); + }); + }); -- libgit2 0.21.2