Skip to content
Browse files

Fix tier=0 for 1-5

  • Loading branch information...
1 parent 551b81b commit 7131ac1a1652deeac02cf1c4e5cfb35ac755d0d1 @joshmoore joshmoore committed Nov 15, 2011
Showing with 8 additions and 1 deletion.
  1. +6 −0 spark
  2. +2 −1 spark-test.sh
View
6 spark
@@ -103,6 +103,10 @@ tier()
{
number_of_ticks=${#ticks[@]}
distance=$(( $(sort_max) / $number_of_ticks ))
+ if [ $distance -eq 0 ]
+ then
+ distance=1
+ fi
echo $distance
}
@@ -177,4 +181,6 @@ data=$(echo $data | tr -s ' ' ',')
setup_array $data
debug "num.ticks: %s\n" ${#ticks[@]}
debug "tier:%s\n" "$(tier)"
+debug "max:%s\n" "$(sort_max)"
+debug "min:%s\n" "$(sort_min)"
print_ticks $data
View
3 spark-test.sh
@@ -64,5 +64,6 @@ it_charts_no_tier_0() {
data="1,2,3,4,5"
graph="$($spark $data)"
- test $graph = '▇▇▇▇▇'
+ test $graph = '▁▂▃▄▅'
+
}

0 comments on commit 7131ac1

Please sign in to comment.
Something went wrong with that request. Please try again.