Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/www/js/controllers/DashboardController.js b/www/js/controllers/DashboardController.js
- index e2584ee..bc439aa 100644
- --- a/www/js/controllers/DashboardController.js
- +++ b/www/js/controllers/DashboardController.js
- @@ -34,9 +34,9 @@ export default function ($scope, $stateParams, Api, ChartOptions, ChartFormatter
- $scope.chart1 = ChartOptions.consuptionChart(ChartFormatter.formatConsuption());
- - $scope.chart2 = ChartOptions.heatingChart(ChartFormatter.formatHeating());
- + $scope.chart2 = ChartOptions.expenseChart(ChartFormatter.formatExpense());
- - $scope.chart3 = ChartOptions.expenseChart(ChartFormatter.formatExpense());
- + $scope.chart3 = ChartOptions.heatingChart(ChartFormatter.formatHeating());
- }
- \ No newline at end of file
- diff --git a/www/js/services/ChartFormatter.js b/www/js/services/ChartFormatter.js
- index a59b899..86be8ee 100644
- --- a/www/js/services/ChartFormatter.js
- +++ b/www/js/services/ChartFormatter.js
- @@ -26,7 +26,7 @@ export default function () {
- },
- formatExpense: function (data) {
- let chartData = [];
- - for (let i = 1; i <= 30; i++) {
- + for (let i = 1; i <= 7; i++) {
- let item = {};
- item.date = i + '. září';
- item.usage = Math.floor(Math.random() * 1000);
- diff --git a/www/js/services/ChartOptions.js b/www/js/services/ChartOptions.js
- index 91c8e7a..29339bb 100644
- --- a/www/js/services/ChartOptions.js
- +++ b/www/js/services/ChartOptions.js
- @@ -61,7 +61,7 @@ export default function () {
- }
- }
- },
- - heatingChart : function (data) {
- + expenseChart : function (data) {
- return {
- type: 'serial',
- categoryField: 'date',
- @@ -101,7 +101,7 @@ export default function () {
- dataProvider: data
- }
- },
- - expenseChart : function (data) {
- + heatingChart : function (data) {
- return {
- type: 'serial',
- categoryField: 'date',
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement