aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShadify <boomkin1234@hotmail.com>2017-12-11 10:02:14 +0100
committerShadify <boomkin1234@hotmail.com>2017-12-11 10:02:14 +0100
commite453e45b7f1c0a658b348e419364ee4bd6f452de (patch)
tree6c577d79c89eea5a2af0c324b9373ac9857ca57c /src
parent96f25c46fb1c1cc686ff35d734d10bb1a9c17352 (diff)
Sorted graph data
Diffstat (limited to 'src')
-rw-r--r--src/AppBundle/Controller/AllDataAverageController.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/AppBundle/Controller/AllDataAverageController.php b/src/AppBundle/Controller/AllDataAverageController.php
index 439058a..87a9d7c 100644
--- a/src/AppBundle/Controller/AllDataAverageController.php
+++ b/src/AppBundle/Controller/AllDataAverageController.php
@@ -28,6 +28,10 @@ class AllDataAverageController extends Controller
$readings = array();
+ usort($data, function($a,$b){
+ return $a['TimeStamp'] - $b['TimeStamp'];
+ });
+
foreach($data as $index => $item)
{