| hd_save | R Documentation |
Exports a highchart or ggplot figure produced by hd_make() to a
file. The output format is inferred from the file extension unless type
is supplied explicitly.
hd_save(
fig,
file,
type = "auto",
width = 8,
height = 5,
dpi = 300,
selfcontained = TRUE,
...
)
fig |
A |
file |
Character. Output path including extension. |
type |
|
width |
Numeric. Width in inches (ggplot2). Default: |
height |
Numeric. Height in inches (ggplot2). Default: |
dpi |
Numeric. Raster resolution for ggplot2. Default: |
selfcontained |
Logical. Embed all JS/CSS in the HTML file.
Default: |
... |
Passed to |
| Backend | Supported formats |
| highcharter | html, json |
| ggplot2 | png, svg, pdf, jpeg, jpg, |
tiff, bmp, eps |
|
To export a highcharter figure as an image, either save as html and
screenshot in a browser, or re-render with backend = "static" in
hd_make() and save as png.
file, invisibly.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.