Add statistics to sidebar
Fix stupid mistake
This commit is contained in:
parent
e1078bbd4c
commit
51ee9cd76f
2 changed files with 8 additions and 1 deletions
|
@ -55,6 +55,13 @@
|
|||
<span>Notifications</span></a>
|
||||
</li>
|
||||
|
||||
<!-- Nav Item - Notification List -->
|
||||
<li class="nav-item {% if title == "Statistics" %}active{% endif %}">
|
||||
<a class="nav-link" href="{% url "mood:statistics" %}">
|
||||
<i class="fas fa-fw fa-smile"></i>
|
||||
<span>Statistics</span></a>
|
||||
</li>
|
||||
|
||||
<!-- Divider -->
|
||||
<hr class="sidebar-divider">
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ def moodstats(user, mindate=None, maxdate=None, days=7):
|
|||
line = hv.Curve(pointtuples)
|
||||
|
||||
maxval = Mood.objects.filter(user=user).latest("value").value
|
||||
maxy = maxval + min(maxval * 0.1, 1)
|
||||
maxy = maxval + max(maxval * 0.1, 1)
|
||||
|
||||
maxx = maxdate.timestamp() * 1000
|
||||
minx = maxx - (60*60*24*7) * 1000
|
||||
|
|
Loading…
Reference in a new issue