View source: R/class-workbook-wrappers.R
| wb_add_sparklines | R Documentation |
wb_add_sparklines() takes the XML definitions created by create_sparklines()
and embeds them into the specified worksheet of a wbWorkbook.
wb_add_sparklines(wb, sheet = current_sheet(), sparklines)
wb |
A wbWorkbook object. |
sheet |
The name or index of the worksheet where the sparklines will be rendered. Defaults to the current sheet. |
sparklines |
A character vector of sparkline XML strings generated
by |
create_sparklines()
sl <- create_sparklines("Sheet 1", dims = "A3:K3", sqref = "L3")
wb <- wb_workbook()
wb <- wb_add_worksheet(wb)
wb <- wb_add_data(wb, x = mtcars)
wb <- wb_add_sparklines(wb, sparklines = sl)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.