spark_bar | R Documentation |
Rendered using block elements. In most common fixed width fonts these are rendered wider than regular characters which means they are not suitable if you need precise alignment.
You might want to avoid sparklines on non-UTF-8 systems, because they
do not look good. You can use is_utf8_output()
to test for support
for them.
spark_bar(x)
x |
A numeric vector between 0 and 1 |
x <- seq(0, 1, length = 6) spark_bar(x)
#> ▁▂▄▅▇█
x <- seq(0, 1, length = 6) spark_bar(sample(x))
#> ▅▁█▄▇▂
spark_bar(seq(0, 1, length = 8))
#> ▁▂▃▄▅▆▇█
NA
s are left out:
spark_bar(c(0, NA, 0.5, NA, 1))
#> ▁ ▄ █
spark_line()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.