hc_theme: Creating highcharter themes

View source: R/theme.R

hc_themeR Documentation

Creating highcharter themes

Description

Highcharts is very flexible so you can modify every element of the chart. There are some exiting themes so you can apply style to charts with few lines of code.

Usage

hc_theme(...)

Arguments

...

A list of named parameters.

Details

More examples and details in https://www.highcharts.com/docs/chart-design-and-style/themes.

Examples


hc <- highcharts_demo()

hc

thm <- hc_theme(
  colors = c("red", "green", "blue"),
  chart = list(
    backgroundColor = "#15C0DE"
  ),
  title = list(
    style = list(
      color = "#333333",
      fontFamily = "Erica One"
    )
  ),
  subtitle = list(
    style = list(
      color = "#666666",
      fontFamily = "Shadows Into Light"
    )
  ),
  legend = list(
    itemStyle = list(
      fontFamily = "Tangerine",
      color = "black"
    ),
    itemHoverStyle = list(
      color = "gray"
    )
  )
)

hc_add_theme(hc, thm)

jbkunst/highcharter documentation built on March 14, 2024, 12:52 a.m.