View source: R/dw_copy_chart.R
dw_copy_chart | R Documentation |
maturing
Creates a new Datawrapper chart object from an existing chart. This function starts the chart-making process like dw_create_chart
.
dw_copy_chart(copy_from, api_key = "environment")
copy_from |
Required. Chart_id from an existing chart which serves as the template. |
api_key |
Required. A Datawrapper-API-key as character string. Defaults to "environment" - tries to automatically retrieve the key that's stored in the .Reviron-file by |
It prints the new chart's id and returns a S3-structure of type dw_chart with the elements from the Datawrapper-API, the same as in dw_retrieve_chart_metadata
and dw_create_chart
.
Benedict Witzenberger
## Not run:
dw_copy_chart(copy_from = "ABCDE")
# uses api-key from environment - if set.
## End(Not run)
## Not run:
dw_copy_chart(copy_from = "ABCDE", api_key = "1234ABCD")
## End(Not run) # uses the specified key
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.