View source: R/dw_button_helper.R
dw_button_helper | R Documentation |
Create clickable buttons to navigate different datawrapper charts
dw_button_helper
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
)
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 |
a character string
dw_id <- c("tXf1C", "6MxFK")
dw_label <- c("2025", "2021")
dw_button_helper(dw_id, dw_label)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.