Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit ec4087b

Browse files
committed
Merge pull request #558 from appirio-tech/feature/SUP-2385
Added front end sorting for history graph
2 parents 32db0ea + 3f92f10 commit ec4087b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/directives/history-graph/history-graph.directive.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@
7979
var desktop = window.innerWidth >= 900 && true;
8080

8181
$scope.promise.then(function(history) {
82+
history.sort(function(left, right) {
83+
left = moment(left.ratingDate);
84+
right = moment(right.ratingDate);
85+
return left > right ? 1 : left < right ? -1 : 0;
86+
})
8287
$scope.history = history;
8388

8489
var parseDate = d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ").parse;

0 commit comments

Comments
 (0)