Skip to content

Commit

Permalink
Fixed issue with reverse and sorted
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Kim committed Sep 20, 2016
1 parent bee5b1a commit df70551
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions graph_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ def order_bucket(series, tuples, threshold):
if(name == baseline):
continue;
if(all_close(series, tuples, threshold)):
return sorted(series).reverse();
series = sorted(series, key=lambda x: tuples[x]["description"]);
series.reverse();
return series;
if(baseline_mean - threshold > cur_mean):
smaller_bucket.append(name);
elif(baseline_mean + threshold < cur_mean):
Expand Down Expand Up @@ -57,7 +59,6 @@ def order_ybar(tuples, xkey, ykey):
threshold = (ymax - ymin) / 100;
series_order = order_bucket(series_names, tuples, threshold);
if(series_order != None):
series_order = flatten(series_order);
series_order.reverse();
else:
series_order = series_names;
Expand Down

0 comments on commit df70551

Please sign in to comment.