dw_button_helper: Generate HTML buttons for datawrapper

View source: R/dw_button_helper.R

dw_button_helperR Documentation

Generate HTML buttons for datawrapper

Description

Create clickable buttons to navigate different datawrapper charts

dw_button_helper

Usage

dw_button_helper(
  dw_id,
  dw_label,
  bg_col_hl = "#414241",
  bg_col_norm = "#BFC0BF",
  font_col_hl = "#FFFFFF",
  font_col_norm = "#FFFFFF",
  font_weight_hl = 800,
  font_weight_norm = 400
)

Arguments

dw_id

a character vector of datawrapper ids

dw_label

a character vector of labels for the buttons

bg_col_hl

a character string for the background color of the highlighted button

bg_col_norm

a character string for the background color of the normal button

font_col_hl

a character string for the font color of the highlighted button

font_col_norm

a character string for the font color of the normal button

font_weight_hl

a numeric value for the font weight of the highlighted button

font_weight_norm

a numeric value for the font weight of the normal button

Value

a character string

Examples

dw_id <- c("tXf1C", "6MxFK")
dw_label <- c("2025", "2021")
dw_button_helper(dw_id, dw_label) 

d-qn/tamTheme documentation built on April 5, 2025, 6:55 p.m.