Skip to contents

Sets chart theme tokens using CSS custom properties

Usage

setTheme(
  myIO,
  text_color = NULL,
  grid_color = NULL,
  bg = NULL,
  font = NULL,
  mode = NULL,
  preset = NULL,
  overrides = list(),
  ...
)

Arguments

myIO

an htmlwidget object created by the myIO() function

text_color

text and label color

grid_color

grid line color

bg

background color

font

font family

mode

Character or NULL. Theme mode: "light", "dark", or "auto". Default NULL (no mode, manual CSS vars only).

preset

Character or NULL. Named preset (reserved for future use). Default NULL.

overrides

Named list of CSS custom property overrides (e.g., list("--chart-tooltip-bg" = "#222")).

...

additional CSS custom property overrides with `–` prefix

Value

A modified myIO htmlwidget object with updated theme configuration.

Examples

myIO() |>
  setTheme(text_color = "#222222", grid_color = "#d9d9d9")
myIO() |> setTheme(mode = "dark", bg = "#1a1a2e")