DiagrammeR (version 0.9.2)

grVizOutput: Widget output function for use in Shiny

Description

Widget output function for use in Shiny

Usage

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

Run this code
# 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)
# }

Run the code above in your browser using DataCamp Workspace