Fix broken negative bars when total is negative (fixes #10)
This commit is contained in:
parent
02bd1853d5
commit
3c1e4ac45d
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ def category_plot(transactions, **kwargs):
|
|||
"categories": categories,
|
||||
}
|
||||
| categories.aggregate(
|
||||
max=Greatest(models.Sum("sum_m"), models.Sum("sum_p")),
|
||||
max=Greatest(-models.Sum("sum_m"), models.Sum("sum_p")),
|
||||
total_m=models.Sum("sum_m"),
|
||||
total_p=models.Sum("sum_p"),
|
||||
total=models.Sum("sum"),
|
||||
|
|
Loading…
Reference in a new issue