Visualize data using a custom D3 visualization script
r2d3(data, script, css = "auto", dependencies = NULL, options = NULL, d3_version = c("5", "4", "3"), container = "svg", elementId = NULL, width = NULL, height = NULL, sizing = default_sizing(), viewer = c("internal", "external", "browser"))
Data to be passed to D3 script.
CSS file containing styles. The default value "auto" will use any CSS file located alongside the script file with the same stem (e.g. "barplot.css" would be used for "barplot.js") as well as any CSS file with the name "styles.css".
Options to be passed to D3 script.
Major D3 version to use, the latest minor version is automatically picked.
The 'HTML' container of the D3 output.
Desired width for output widget.
Desired height for output widget.
Widget sizing policy (see htmlwidgets::sizingPolicy).
"internal" to use the RStudio internal viewer pane for output; "external" to display in an external RStudio window; "browser" to display in an external browser.
In order to scope CSS styles when multiple widgets are rendered, the Shadow DOM and
the wecomponents polyfill is used, this feature can be turned off by setting the
r2d3.shadow option to