1

I want to display a flow chart in shiny, it just not showing in shiny browsers, but displays in the viewer pane in rstudio.

library(shiny)
library(DiagrammeR)

ui <- fluidPage(
  plotOutput(outputId ="temp")
)

server <- function(input, output, session) {
  plotInput = function(){
    DiagrammeR(paste('graph LR',
                     sprintf("A(%s)-->B", iris[1,1]),
                     sep = ';'))
  }

  output$temp<-renderPlot(
    plotInput()
  )
}

shinyApp(ui, server)
Mercury
  • 81
  • 1
  • 1
  • 4
  • Are you sure you're not required to use the widget render and output functions for that chart type? https://rdrr.io/cran/DiagrammeR/man/grVizOutput.html – Ryan Morton Aug 21 '19 at 16:39

0 Answers0