summaryrefslogtreecommitdiff
path: root/app/Controller
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-02-11 19:42:17 -0500
committerFrederic Guillot <fred@kanboard.net>2017-02-11 19:42:17 -0500
commitc5caff7ef79f1440ff26c84eed2dbc8254122f36 (patch)
treee6dbd39514d1210d43615f2ef1516c613019058f /app/Controller
parent2c4509641103fa94a31c89e0e9f1a2d6088e57b1 (diff)
Fix CFD chart (stack wrongly ordered)
Diffstat (limited to 'app/Controller')
-rw-r--r--app/Controller/AnalyticController.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/app/Controller/AnalyticController.php b/app/Controller/AnalyticController.php
index 38169fd7..a30041b2 100644
--- a/app/Controller/AnalyticController.php
+++ b/app/Controller/AnalyticController.php
@@ -143,17 +143,18 @@ class AnalyticController extends BaseController
$project = $this->getProject();
list($from, $to) = $this->getDates();
- $display_graph = $this->projectDailyColumnStatsModel->countDays($project['id'], $from, $to) >= 2;
+ $displayGraph = $this->projectDailyColumnStatsModel->countDays($project['id'], $from, $to) >= 2;
+ $metrics = $displayGraph ? $this->projectDailyColumnStatsModel->getAggregatedMetrics($project['id'], $from, $to, $column) : array();
$this->response->html($this->helper->layout->analytic($template, array(
- 'values' => array(
+ 'values' => array(
'from' => $from,
- 'to' => $to,
+ 'to' => $to,
),
- 'display_graph' => $display_graph,
- 'metrics' => $display_graph ? $this->projectDailyColumnStatsModel->getAggregatedMetrics($project['id'], $from, $to, $column) : array(),
- 'project' => $project,
- 'title' => $title,
+ 'display_graph' => $displayGraph,
+ 'metrics' => $metrics,
+ 'project' => $project,
+ 'title' => $title,
)));
}