Description Usage Arguments References Examples
Create a TauCharts bar chart (horizontal or vertical)
1 |
tau |
taucharts object |
x |
quoted name of |
y |
quoted name of |
color |
quoted name of |
size |
quoted name of |
horizontal |
should the bar chart be horizontal? (default: |
http://api.taucharts.com/basic/line.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | data(mpg, package="ggplot2")
tauchart(dplyr::count(mpg, class)) %>%
tau_bar("class", "n")
# facets
tauchart(dplyr::count(mpg, manufacturer, class)) %>%
tau_bar("class", c("manufacturer", "n"))
#facets
mfclass <- dplyr::count(mpg, manufacturer, model, class)
tauchart(mfclass) %>%
tau_bar(c("manufacturer", "model"), "n")
# ordered factors on x-axis
mfclass$class <- factor(mfclass$class,
levels=c("2seater", "subcompact", "compact",
"midsize", "minivan", "suv", "pickup"),
ordered=TRUE)
tauchart(mfclass) %>%
tau_bar(c("class", "manufacturer"), "n")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.