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
ndtvAnimationWidget(out, options, width = NULL, height = NULL)renderNdtvAnimationWidget(expr, env = parent.frame(), quoted = FALSE)
ndtvAnimationWidgetOutput(outputId, width = "100%", height = "500px")
the data structure describing the network animation. produced internally by render.d3movie
usually the 'd3.options'
from render.d3movie
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.
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.
An expression that does any necessary network processing and generates an HTML widget (usually via render.d3move
). See htmlwidgets-shiny
The environment in which to evaluate expr. See htmlwidgets-shiny
Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable. See htmlwidgets-shiny
skyebend@uw.edu
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'
.
htmlwidgets-package
, render.d3movie