Add trend to history chart

This commit is contained in:
Edgar P. Burkhart 2023-04-19 18:35:57 +02:00
parent 9db123457f
commit 5534a4352d
Signed by: edpibu
GPG Key ID: 9833D3C5A25BD227
1 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,7 @@
<div class="plot">
<table class="full-width">
<colgroup>
<col class="icon">
<col class="desc">
<col class="value">
<col span="2" class="bar">
@ -10,6 +11,7 @@
</colgroup>
<thead>
<tr>
<th scope="col">{{ "expand-up-down"|remix }}</th>
<th scope="col">{% translate "Month" %}</th>
<th scope="col" colspan="2">{% translate "Expenses" %}</th>
<th scope="col" colspan="2">{% translate "Income" %}</th>
@ -19,6 +21,9 @@
{% spaceless %}
{% for date in history.data %}
<tr>
<td class="icon">
<span class="ri-{% if date.sum > 0 %}arrow-up-s-line green{% elif date.sum < 0 %}arrow-down-s-line red{% else %}equal-line{% endif %}"></span>
</td>
<th class="date" scope="row">{{ date.month|date:"Y-m" }}</th>
<td class="value">{{ date.sum_m|pmrvalue }}</td>
<td class="bar m">