Sparkline in unicode: Difference between revisions

Content added Content deleted
(→‎{{header|AppleScript}}: Added two test samples recently suggested in Discussion page, updated code to normalize their rendering)
(It may be helpful to add the edge cases suggested on the Discussion page.)
Line 22: Line 22:
* A space is not part of the generated sparkline.
* A space is not part of the generated sparkline.
* The sparkline may be accompanied by simple statistics of the data such as its range.
* The sparkline may be accompanied by simple statistics of the data such as its range.
* A suggestion emerging in later discussion (see [[Talk:Sparkline_in_unicode|Discussion]]) is that lower bounds for each bin should ideally be set to yield the following results for two particular edge cases:

<code>"0, 1, 19, 20" -> ▁▁██</code>
(Aiming to use just two spark levels)

<code>"0, 999, 4000, 4999, 7000, 7999" -> ▁▁▅▅██</code>
(Aiming to use just three spark levels)

It may be helpful to include these cases in output tests.
<br><br>
<br><br>