Kaynağa Gözat

Better display of graph

Denis Merigoux 9 yıl önce
ebeveyn
işleme
4b4c8ac26e
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      counter/views.py

+ 1 - 1
counter/views.py

35
 
35
 
36
     #Generate graph
36
     #Generate graph
37
     data = SimpleDataSource(lastResets)
37
     data = SimpleDataSource(lastResets)
38
-    chart = gchart.ColumnChart(data,options={'title' : 'Graphe du seum', 'legend' : 'none','vAxis' : { 'viewWindow' : { 'max' : maxJSS+0.25} , 'ticks' : [1,2,3,4,5,6,7,8,9,10,11,12,13,14],'title' : 'Jours sans seum' }, 'hAxis' : {'title' : 'Trigramme' }})
38
+    chart = gchart.ColumnChart(data,options={'title' : 'Graphe du seum', 'legend' : 'none','vAxis' : { 'viewWindow' : { 'max' : max(maxJSS,1) , 'min' : 0} , 'ticks' : [1,2,3,4,5,6,7,8,9,10,11,12,13,14],'title' : 'Jours sans seum' }, 'hAxis' : {'title' : 'Trigramme' }})
39
     return render(request,'counterTemplate.html', {'counters' : counters, 'chart' : chart})
39
     return render(request,'counterTemplate.html', {'counters' : counters, 'chart' : chart})
40
 
40
 
41
 def resetCounter(request):
41
 def resetCounter(request):