ndtvAnimationWidget {ndtv} | R Documentation |
htmlwidgets wrapper functions for including ndtv-d3 animations in shinyapps
Description
Wrapper functions to provide ndtv-d3 animation as an htmlwidget
for use within an RStudio "shiny" web application. These functions are not normally called by R users directly. For example shiny app template code please see the 'server.R' and 'ui.R' files at https://github.com/statnet/ndtv/tree/master/htmlWidgetShinyTest
Usage
ndtvAnimationWidget(out, options, width = NULL, height = NULL)
renderNdtvAnimationWidget(expr, env = parent.frame(), quoted = FALSE)
ndtvAnimationWidgetOutput(outputId, width = "100%", height = "500px")
Arguments
out |
the data structure describing the network animation. produced internally by |
options |
usually the |
width |
Display width for the widget. Must be a valid CSS unit (like "100%", "400px", "auto") or a number, which will be coerced to a string and have "px" appended. |
height |
Display eight for the widget. Must be a valid CSS unit (like "100%", "400px", "auto") or a number, which will be coerced to a string and have "px" appended. |
outputId |
|
expr |
An expression that does any necessary network processing and generates an HTML widget (usually via |
env |
The environment in which to evaluate expr. See |
quoted |
Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable. See |
Details
The ndtv-d3 interactive HTML5 network animation can normally be produced via render.d3movie(...,output.mode='htmlWidget')
. These functions are wrappers to make it possible to embed the animations as part of a 'Shiny' (https://shiny.posit.co/) web application.
renderNdtvAnimationWidget
should be used as the wraper for the render.d3movie
call within the app's server.R
file and ndtvAnimationWidgetOutput
is the corresponding ui component to include in the ui.R
file. See htmlwidgets-shiny
ndtvAnimationWidget
initializes the widget, usually called automatically inside render.d3movie
when output.mode='htmlWidget'
.
Author(s)
skyebend@uw.edu
See Also
htmlwidgets-package
, render.d3movie