vega_embed( renderer = c("canvas", "svg"), actions = NULL, defaultStyle = TRUE, config = NULL, patch = NULL, bind = NULL, ... )
character the renderer to use for the view.
"canvas" (default) or
See Vega docs
logical or named vector of logicals, determines if action links
("Export as PNG/SVG", "View Source", "Open in Vega Editor")
are included with the embedded view.
If the value is
TRUE (default), all action links will be shown
and none if the value is
FALSE. This property can be a named vector of
logicals that maps
editor) to logical values for determining
if each action link should be shown. By default,
FALSE, but these defaults
can be overridden. For example, if
list(export = FALSE, source = TRUE), the embedded visualization will
have two links – "View Source" and "Open in Vega Editor".
default stylesheet for embed actions. If set to
the embed actions are shown in a menu. Set to
FALSE to use simple links.
character string to set the style sheet.
list, a URL string from which to load
a Vega/Vega-Lite or Vega-Lite configuration file, or a
Vega/Vega-Lite configurations to override the default configuration
config is a URL, it will be subject to standard browser
security restrictions. Typically this URL will point to a file on the same
host and port number as the web page itself.
character, A function to modify the
Vega specification before it is parsed. Alternatively, an
when compiled to JSON, will meet
If you use Vega-Lite, the compiled Vega will be patched.
Alternatively to the function or the
list, a URL string from which to
load the patch can be provided. This URL will be subject to standard
browser security restrictions. Typically this URL will point to a file
on the same host and port number as the web page itself.
other named items, outlined in vega-embed options.
The most important arguments are
The default for
NULL, which means that the
editor links are shown, but the
compiled link is
To suppress all action links, call with
actions = FALSE.
To change from the default for a given action link, call with a list:
actions = list(editor = FALSE).
The default for
TRUE, which means that action-links
are rendered in a widget at the upper-right corner of the rendered chart.
The vega-embed library has a lot
more options, you can supply these as names arguments using
For example, it is ineffective to set the
here when embedding a Vega-Lite specification, as they will be overridden
by the value in the chart specification.
vega_embed(renderer = "svg") #> $renderer #>  "svg" #> #> $defaultStyle #>  TRUE #>