add_chart | R Documentation |
Optionally provide a cell for the top-left anchor
add_chart(py_obj, chart, anchor = NULL, ...)
py_obj |
py_obj |
chart |
chart |
anchor |
anchor |
... |
Additional arguments, i.e. kwargs. |
An openpyxl Python object.
## Not run:
wb <- Workbook()
ws <- wb$active
chart <- BarChart(type = "col")
data <- Reference(ws, min_col=2, min_row=1, max_row=7, max_col=3)
cats <- Reference(ws, min_col=1, min_row=2, max_row=7)
chart |>
add_data(data = data, titles_from_data = TRUE) |>
set_categories(cats)
ws |> add_chart(chart, "A10")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.