Description Usage Arguments Value Author(s) Examples
The current theme is automatically applied to any plot created with
ggcharts
. It does not affect plots created with ggplot2
.
1 2 3 | ggcharts_get_theme()
ggcharts_set_theme(theme, ...)
|
theme |
|
... |
Additional argument passed onto the specified |
ggchart_set_theme
invisibly returns the name of the previously active
theme as a character
. ggchart_get_theme
returns the name of the
currently active theme as a character
.
Thomas Neitmann
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | data("diamonds", package = "ggplot2")
## By default `theme_ggcharts()` is used
ggcharts_get_theme()
bar_chart(diamonds, cut)
ggcharts_set_theme("theme_hermit")
bar_chart(diamonds, cut)
ggcharts_set_theme("theme_ng")
bar_chart(diamonds, cut)
ggcharts_set_theme("theme_nightblue", base_size = 16, base_family = "serif")
bar_chart(diamonds, cut)
## Restore the default
ggcharts_set_theme("theme_ggcharts")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.