addColumn(trans('firefly.date'), 'date'); $chart->addColumn(trans('firefly.balance'), 'number'); $sum = '0'; bcscale(2); foreach ($set as $entry) { $sum = bcadd($sum, $entry->sum); $chart->addRow(new Carbon($entry->date), $sum); } $chart->generate(); return $chart->getData(); } }