2016-12-23 07:02:45 +01:00
|
|
|
/*
|
|
|
|
* show.js
|
2017-10-21 08:40:00 +02:00
|
|
|
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
2016-12-23 07:02:45 +01:00
|
|
|
*
|
2017-10-21 08:40:00 +02:00
|
|
|
* This file is part of Firefly III.
|
2016-12-23 07:02:45 +01:00
|
|
|
*
|
2017-10-21 08:40:00 +02:00
|
|
|
* Firefly III is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* Firefly III is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2017-12-17 14:43:13 +01:00
|
|
|
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
2016-12-23 07:02:45 +01:00
|
|
|
*/
|
|
|
|
|
2017-06-07 07:38:58 +02:00
|
|
|
/** global: budgetChartUri, expenseCategoryUri, expenseAssetUri, expenseExpenseUri, budgetLimitID */
|
2017-01-02 08:30:20 +01:00
|
|
|
|
2015-05-24 22:54:59 +02:00
|
|
|
$(function () {
|
2015-05-24 18:22:41 +02:00
|
|
|
"use strict";
|
2017-03-18 07:46:14 +01:00
|
|
|
if (budgetLimitID > 0) {
|
|
|
|
lineChart(budgetChartUri, 'budgetOverview');
|
|
|
|
}
|
2017-04-09 07:56:46 +02:00
|
|
|
if (budgetLimitID === 0) {
|
2017-03-18 07:46:14 +01:00
|
|
|
columnChart(budgetChartUri, 'budgetOverview');
|
|
|
|
}
|
2015-02-22 09:46:21 +01:00
|
|
|
|
2017-04-22 07:04:39 +02:00
|
|
|
// other three charts:
|
2018-03-25 21:16:46 +02:00
|
|
|
if (budgetLimitID > 0) {
|
|
|
|
pieChart(expenseCategoryUri, 'budget-cat-out');
|
|
|
|
pieChart(expenseAssetUri, 'budget-asset-out');
|
|
|
|
pieChart(expenseExpenseUri, 'budget-expense-out');
|
|
|
|
}
|
2017-04-22 07:04:39 +02:00
|
|
|
|
2015-05-24 22:54:59 +02:00
|
|
|
});
|