diff options
author | Shadify <boomkin1234@hotmail.com> | 2017-12-11 10:02:14 +0100 |
---|---|---|
committer | Shadify <boomkin1234@hotmail.com> | 2017-12-11 10:02:14 +0100 |
commit | e453e45b7f1c0a658b348e419364ee4bd6f452de (patch) | |
tree | 6c577d79c89eea5a2af0c324b9373ac9857ca57c /src/AppBundle/Controller | |
parent | 96f25c46fb1c1cc686ff35d734d10bb1a9c17352 (diff) |
Sorted graph data
Diffstat (limited to 'src/AppBundle/Controller')
-rw-r--r-- | src/AppBundle/Controller/AllDataAverageController.php | 4 |
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) { |