use_svgzoom | R Documentation |
This function must be called in the UI, in order to make the vtree
interactive.
use_svgzoom(minheight = "200px", cursor_all = "all-scroll", overflow = "inherit !important", position = "sticky", fill = "transparent", cursor_text = "pointer", init_event = c("mouseenter", "click", "dblclick"), onwindow_resize = TRUE, shortcuts = TRUE)
minheight |
minimum height in |
cursor_all |
The cursor symbol for the whole SVG. Default is "all-scroll". |
overflow |
Overflow value for the whole SVG. Default is "inherit". |
position |
CSS position of the SVG. Default is "sticky". |
fill |
Fill color for the SVG background. Default is "transparent". |
cursor_text |
The cursor symbol for text nodes. Default is "pointer". |
init_event |
The mouse event to activate zooming and panning.
Default is |
onwindow_resize |
Should the SVG be resized when the window size changes?
Default is |
shortcuts |
Should Keyboard shortcuts be used to control the SVG?
Default is |
vtreeOutput
, vtree
Other Shiny Functions:
init_js()
,
inlineCssSetup()
,
renderVtree()
,
vtreeOutput()
## Not run: library(shiny) library(vtree) ui <- fluidPage( use_svgzoom(), helpText(div(style="font-weight: 800; font-size: large; color: black;", HTML("Zooming and Panning is possible with mouse-drag ", "and mouse-wheel <br>, or with shortcuts;", " +,- and arrow-keys and CTRL+Backspace to", " resize+fit+center the svg.."))), vtreeOutput("vtree", width = "100%", height = "500px") ) server <- function(input, output, session) { output$vtree <- renderVtree({ vtree(FakeData,"Severity Sex", labelnode=list(Sex=(c("Male"="M","Female"="F"))), pngknit=FALSE) }) } shinyApp(ui, server) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.