mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 19:01:58 +00:00
Slightly different chart on index.
This commit is contained in:
@@ -144,8 +144,8 @@ class GoogleChartController extends Controller
|
|||||||
public function allBudgetsHomeChart(GChart $chart, BudgetRepositoryInterface $repository)
|
public function allBudgetsHomeChart(GChart $chart, BudgetRepositoryInterface $repository)
|
||||||
{
|
{
|
||||||
$chart->addColumn('Budget', 'string');
|
$chart->addColumn('Budget', 'string');
|
||||||
$chart->addColumn('Budgeted', 'number');
|
$chart->addColumn('Left', 'number');
|
||||||
$chart->addColumn('Spent', 'number');
|
//$chart->addColumn('Spent', 'number');
|
||||||
|
|
||||||
$budgets = $repository->getBudgets();
|
$budgets = $repository->getBudgets();
|
||||||
$start = Session::get('start', Carbon::now()->startOfMonth());
|
$start = Session::get('start', Carbon::now()->startOfMonth());
|
||||||
@@ -171,7 +171,8 @@ class GoogleChartController extends Controller
|
|||||||
|
|
||||||
foreach ($allEntries as $entry) {
|
foreach ($allEntries as $entry) {
|
||||||
if ($entry[2] > 0) {
|
if ($entry[2] > 0) {
|
||||||
$chart->addRow($entry[0], $entry[1], $entry[2]);
|
$left = $entry[1] - $entry[0];
|
||||||
|
$chart->addRow($entry[0], $left);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -3,7 +3,7 @@ google.setOnLoadCallback(drawChart);
|
|||||||
|
|
||||||
function drawChart() {
|
function drawChart() {
|
||||||
googleLineChart('chart/home/account', 'accounts-chart');
|
googleLineChart('chart/home/account', 'accounts-chart');
|
||||||
googleBarChart('chart/home/budgets', 'budgets-chart');
|
googleColumnChart('chart/home/budgets', 'budgets-chart');
|
||||||
googleColumnChart('chart/home/categories', 'categories-chart');
|
googleColumnChart('chart/home/categories', 'categories-chart');
|
||||||
googlePieChart('chart/home/bills', 'bills-chart');
|
googlePieChart('chart/home/bills', 'bills-chart');
|
||||||
getBoxAmounts();
|
getBoxAmounts();
|
||||||
|
Reference in New Issue
Block a user