Skip to content

Commit

Permalink
sort axis tick numbers in numeric order
Browse files Browse the repository at this point in the history
Array.sort sorts in alphabetical order by default, and the visual
gets corrupted. This happens with values like
[0,1,2,3,4,5,6,7,8,9,10,11].sort()
  • Loading branch information
hkwi committed May 15, 2016
1 parent 29a4c8e commit 477fc81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/viz/types/helpers/graph/includes/axes.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ axisRange = (vars, axis, zero, buffer) ->
, []
counts
else
uniques(values).sort()
uniques(values).sort((a,b) -> a-b)
else
values.sort (a, b) -> a - b
if vars[axis].scale.value is "log"
Expand Down

0 comments on commit 477fc81

Please sign in to comment.