Fix the report chart.

This commit is contained in:
James Cole
2015-12-12 10:41:51 +01:00
parent 9284eb3fe9
commit 6426d1df06
5 changed files with 66 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
/* globals google, picker:true, minDate, expenseRestShow:true, incomeRestShow:true, year, shared, month, hideTheRest, showTheRest, showTheRestExpense, hideTheRestExpense, columnChart, lineChart, stackedColumnChart */
/* globals google,reportURL, picker:true, minDate, expenseRestShow:true, incomeRestShow:true, year, shared, month, hideTheRest, showTheRest, showTheRestExpense, hideTheRestExpense, columnChart, lineChart, stackedColumnChart */
$(function () {
@@ -114,9 +114,13 @@ function drawChart() {
stackedColumnChart('chart/category/spent-in-year/' + year + shared, 'categories-spent-in-year');
stackedColumnChart('chart/category/earned-in-year/' + year + shared, 'categories-earned-in-year');
}
if (typeof lineChart !== 'undefined' && typeof month !== 'undefined') {
if (typeof lineChart !== 'undefined' && typeof month !== 'undefined' && typeof reportURL === 'undefined') {
lineChart('/chart/account/month/' + year + '/' + month + shared, 'account-balances-chart');
}
if (typeof lineChart !== 'undefined' && typeof reportURL !== 'undefined') {
//http://firefly.app/chart/account/report/default;20151101;20151130;2
lineChart('/chart/account/report/' + reportURL, 'account-balances-chart');
}
}