mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-31 19:27:51 -06:00
25 lines
709 B
JavaScript
25 lines
709 B
JavaScript
google.setOnLoadCallback(drawChart);
|
|
|
|
|
|
function drawChart() {
|
|
googleLineChart('chart/account/frontpage', 'accounts-chart');
|
|
googlePieChart('chart/bill/frontpage', 'bills-chart');
|
|
googleStackedColumnChart('chart/budget/frontpage', 'budgets-chart');
|
|
googleColumnChart('chart/category/frontpage', 'categories-chart');
|
|
|
|
|
|
getBoxAmounts();
|
|
}
|
|
|
|
function getBoxAmounts() {
|
|
var boxes = ['in', 'out', 'bills-unpaid', 'bills-paid'];
|
|
for (x in boxes) {
|
|
var box = boxes[x];
|
|
$.getJSON('/json/box/' + box).success(function (data) {
|
|
$('#box-' + data.box).html(data.amount);
|
|
}).fail(function () {
|
|
console.log('Failed to get box!')
|
|
});
|
|
}
|
|
}
|