From 81e40e2c910f0be3f6031445a4d2c1714cdeb385 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 21 Jun 2015 21:12:24 -0400 Subject: Replace dimplejs by c3js for chart drawing --- app/Model/ProjectDailySummary.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/Model/ProjectDailySummary.php') diff --git a/app/Model/ProjectDailySummary.php b/app/Model/ProjectDailySummary.php index 65a612f6..acffa3a9 100644 --- a/app/Model/ProjectDailySummary.php +++ b/app/Model/ProjectDailySummary.php @@ -149,9 +149,10 @@ class ProjectDailySummary extends Base * @param integer $project_id Project id * @param string $from Start date (ISO format YYYY-MM-DD) * @param string $to End date + * @param string $column Column to aggregate * @return array */ - public function getAggregatedMetrics($project_id, $from, $to) + public function getAggregatedMetrics($project_id, $from, $to, $column = 'total') { $columns = $this->board->getColumnsList($project_id); $column_ids = array_keys($columns); @@ -172,7 +173,7 @@ class ProjectDailySummary extends Base $aggregates[$record['day']] = array($record['day']); } - $aggregates[$record['day']][$record['column_id']] = $record['total']; + $aggregates[$record['day']][$record['column_id']] = $record[$column]; } // Aggregate by row -- cgit v1.2.3