grVizOutput: Widget output function for use in Shiny

Description Usage Arguments Examples

View source: R/grViz.R

Description

Widget output function for use in Shiny

Usage

1
grVizOutput(outputId, width = "100%", height = "400px")

Arguments

outputId

output variable to read from

width

a valid CSS unit for the width or a number, which will be coerced to a string and have px appended.

height

a valid CSS unit for the height or a number, which will be coerced to a string and have px appended.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Not run: 
library(shiny)
library(shinyAce)

ui = shinyUI(fluidPage(fluidRow(
  column(
    width=4
    , aceEditor("ace", selectionId = "selection", value="digraph {A;}")
  ),
  column(
    width = 6
    , grVizOutput('diagram' )
  )
)))

server = function(input, output) {
  output$diagram <- renderGrViz({
    grViz(
      input$ace
    )
  })

}

shinyApp(ui = ui, server = server)

## End(Not run)

DiagrammeR documentation built on Sept. 7, 2017, 1:06 a.m.