Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Spent should not be negative for the chart.
James Cole0bde72d3df0c
diff --git a/app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php b/app/Generator/Chart/Category/ChartJsCategoryChartGenerator.phpindex 196a5ecd2f..6d26478e21 100644--- a/app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php+++ b/app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php@@ -48,7 +48,7 @@ class ChartJsCategoryChartGenerator implements CategoryChartGenerator$spent = round($entry[1], 2);$earned = round($entry[2], 2);- $data['datasets'][0]['data'][] = $spent == 0 ? null : $spent;+ $data['datasets'][0]['data'][] = $spent == 0 ? null : $spent * -1;$data['datasets'][1]['data'][] = $earned == 0 ? null : $earned;}