Skip to content

Commit 2550076

Browse files
committed
use a larger tick if data is constant
fixes holman#72
1 parent 9832447 commit 2550076

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spark

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ spark()
5858
# print ticks
5959
local ticks=(▁ ▂ ▃ ▄ ▅ ▆ ▇ █)
6060

61+
# use a high tick if data is constant
62+
(( min == max )) && ticks=(▅ ▆)
63+
6164
local f=$(( (($max-$min)<<8)/(${#ticks[@]}-1) ))
6265
(( f < 1 )) && f=1
6366

0 commit comments

Comments
 (0)