Description Usage Arguments Examples
Save a D3 visualization as a PDF file
1 | save_d3_pdf(d3, file, background = "white", delay = 0.5)
|
d3 |
D3 visualization to save. |
file |
File to save PDF into. |
background |
Text string giving the html background color of |
delay |
Delay (in seconds) to wait before saving the SVG. the widget. Defaults to white. |
1 2 3 4 5 6 7 8 | library(r2d3)
viz <- r2d3(
data = c(0.3, 0.6, 0.8, 0.95, 0.40, 0.20),
script = system.file("examples/barchart.js", package = "r2d3")
)
save_d3_pdf(viz, file = tempfile(fileext = ".pdf"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.