Jump to content

Sparkline in unicode: Difference between revisions

m
change for 1.0 version
m (for version 1.0+)
m (change for 1.0 version)
Line 1,402:
1 2 3 4 5 6 7 8 7 6 5 4 3 2 1
1.5, 0.5 3.5, 2.5 5.5, 4.5 7.5, 6.5""", "\n"))
arrays = map(lin -> split(lin, r"\s+|\s*,\s*") .|> s -> parse(Float64, s) .|> round .|> Int, lines)
foreach(v -> println("$v → ", sparklineit(v)), arrays)
</lang>
Line 1,409:
[0.57, 0.14, 4.73, 6.61, 6.9, 0.8, 9.71, 7.39, 2.75, 5.7] → ▁▁▄▆▆▁█▇▃▅
[1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1] → ▁▂▃▄▅▆▇█▇▆▅▄▃▂▁
[21.5, 0.5, 43.5, 2.5, 65.5, 4.5, 87.5, 6.5] → ▂▁▄▂▆▄█▆▂▁▄▃▆▅█▇</pre>
 
=={{header|Kotlin}}==
4,105

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.