Skip to content

Commit

Permalink
Fixed NaN results
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Feb 21, 2018
1 parent ef2c4a0 commit 450d4fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/ChartHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static function getRunChartDataFromQuery(Query $query, DateTime $startDat
while ($cursorDate->getTimestamp() < $endTimestamp) {
$cursorEndDate = clone $cursorDate;
$cursorEndDate->modify('+1 '.$intervalUnit);
$total = (clone $query)
$total = (int)(clone $query)
->andWhere(['>=', $dateColumn, Db::prepareDateForDb($cursorDate)])
->andWhere(['<', $dateColumn, Db::prepareDateForDb($cursorEndDate)])
->scalar();
Expand Down

0 comments on commit 450d4fb

Please sign in to comment.