diff --git a/public/views.py b/public/views.py index 7598e71..080f481 100644 --- a/public/views.py +++ b/public/views.py @@ -52,8 +52,8 @@ def json_average_by_dep(request): def compBDep(request): import datetime days = [] #Getting the dates of the week - #date = datetime.date.today() - date = datetime.datetime.strptime("2015-01-27", "%Y-%m-%d").date() + date = datetime.date.today() + #date = datetime.datetime.strptime("2015-01-27", "%Y-%m-%d").date() start_week = date - datetime.timedelta(date.weekday()) for i in range(7): days.append(str(start_week + datetime.timedelta(i))) diff --git a/static/public/bootstrap/js/graphe.js b/static/public/bootstrap/js/graphe.js index fdde77d..27dfc31 100644 --- a/static/public/bootstrap/js/graphe.js +++ b/static/public/bootstrap/js/graphe.js @@ -38,34 +38,35 @@ $(document).ready(function(){ //Gestion de la comparaison entre les departements $(".dropdown-menu li a").click(function(){ if ($(this).attr("href") == "#rap1"){ - $.get('/rapport/average',function(data,status){ - // alert(data); + $.get('/rapport/pluviometrie/comp/',function(data,status){ + //alert(data.jr); //alert(data.table[0].dep); var i; var objs = data.table + //alert(data.table[0].nomDep) + //les coulleurs + fill = ["rgba(124,232,128,0.5)","rgba(4,11,95,0.5)","rgba(34,177,18,0.5)","rgba(140,171,17,0.5)","rgba(124,232,128,0.5)","rgba(4,39,28,0.5)"] + stroke = ["rgba(4,39,28,0.5)","rgba(4,39,28,0.5)","rgba(4,39,28,0.5)","rgba(4,39,28,0.5)","rgba(4,39,28,0.5)","rgba(4,39,28,0.5)","rgba(4,39,28,0.5)","rgba(4,39,28,0.5)","rgba(4,39,28,0.5)","rgba(4,39,28,0.5)"] + //les coulleurs - labl =[] datasz = [] for(i=0;i