diff --git a/app/Http/Controllers/GoogleChartController.php b/app/Http/Controllers/GoogleChartController.php index 1b68be4e7f..0c7b0f218e 100644 --- a/app/Http/Controllers/GoogleChartController.php +++ b/app/Http/Controllers/GoogleChartController.php @@ -184,18 +184,20 @@ class GoogleChartController extends Controller $allEntries->push(['(no budget)', 0, 0, $noBudgetExpenses]); foreach ($allEntries as $entry) { - $chart->addRow($entry[0], $entry[1], $entry[2], $entry[3]); -// if ($entry[2] > 0) { -// $left = $entry[1] - $entry[2]; -// if ($left > 0) { -// $chart->addRow($entry[0], $left, null); -// } else { -// if ($left < 0) { -// $chart->addRow($entry[0], null, $left); -// } -// } -// -// } + if ($entry[1] != 0 || $entry[2] != 0 || $entry[3] != 0) { + $chart->addRow($entry[0], $entry[1], $entry[2], $entry[3]); + } + // if ($entry[2] > 0) { + // $left = $entry[1] - $entry[2]; + // if ($left > 0) { + // $chart->addRow($entry[0], $left, null); + // } else { + // if ($left < 0) { + // $chart->addRow($entry[0], null, $left); + // } + // } + // + // } } $chart->generate();