ggcharts_get_theme: Get and Set the Currently Active ggcharts Theme

Description Usage Arguments Value Author(s) Examples

View source: R/theme.R

Description

The current theme is automatically applied to any plot created with ggcharts. It does not affect plots created with ggplot2.

Usage

1
2
3

Arguments

theme

character. The name of the theme, e.g. "theme_hermit"

...

Additional argument passed onto the specified theme

Value

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.

Author(s)

Thomas Neitmann

Examples

 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 = 18, base_family = "serif")
bar_chart(diamonds, cut)

## Restore the default
ggcharts_set_theme("theme_ggcharts")

thomas-neitmann/ggcharts documentation built on Oct. 8, 2021, 1:17 a.m.