Skip to content

Commit

Permalink
Merge pull request #3 from alpae/stable-order
Browse files Browse the repository at this point in the history
sort tools alphabetically (case insensitive)
  • Loading branch information
javi-gv94 authored Mar 23, 2020
2 parents 674586c + 74f34d7 commit 809c24c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@ function join_all_json(result, divid, metric_x, metric_y,metrics_names, better){
full_json.push(jo);

});
full_json.sort(function(a,b){
let x = a.toolname.toLowerCase();
let y = b.toolname.toLowerCase();
if (x < y) { return -1;}
if (x > y){ return 1;}
return 0;
});

MAIN_DATA[divid] = full_json;
MAIN_METRICS[divid] = metrics_names;
Expand Down

0 comments on commit 809c24c

Please sign in to comment.