Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,19 @@
|
|||
put sparklineGraph of "1 2 3 4 5 6 7 8 7 6 5 4 3 2 1"
|
||||
put sparklineGraph of "1.5, 0.5 3.5, 2.5 5.5, 4.5 7.5, 6.5"
|
||||
put sparklineGraph of "0, 1, 19, 20"
|
||||
put sparklineGraph of "0, 999, 4000, 4999, 7000, 7999"
|
||||
|
||||
to handle sparklineGraph of input
|
||||
put each word delimited by " ," of input into numbers
|
||||
put the lowestValue of numbers into bottom
|
||||
put the highestValue of numbers into top
|
||||
put top - bottom into range -- total range of values
|
||||
put range/8 into step -- the size of each incremental step in the graph
|
||||
|
||||
repeat with each number in numbers
|
||||
put (trunc((number - bottom) / step) + 1) but no more than 8 into symbolNum
|
||||
put character symbolNum of "▁▂▃▄▅▆▇█" after graph
|
||||
end repeat
|
||||
put !" (range: [[bottom]] to [[top]])" after graph
|
||||
return graph
|
||||
end sparklineGraph
|
||||
Loading…
Add table
Add a link
Reference in a new issue