save_d3_pdf: Save a D3 visualization as a PDF file

Description Usage Arguments Examples

View source: R/save_d3_pdf.R

Description

Save a D3 visualization as a PDF file

Usage

1
save_d3_pdf(d3, file, background = "white", delay = 0.5)

Arguments

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.

Examples

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"))

hafen/r2d3svg documentation built on Feb. 7, 2020, 12:23 a.m.