library(shiny)
library(d3Histogram)
library(d3WordCloudWidget)
ui <- shinyUI(fluidPage(
fluidRow(
column(width = 6, d3HistogramOutput("d3Hist"))),
fluidRow(
column(2, d3WordCloudWidgetOutput(
"d3Cloud", width = "80%", height = 600
)))
))
server <- shinyServer(function(input, output) {
output$d3Hist <- renderD3Histogram({
dataset <- data.frame(lpu = c('Apple','Banana','Orange'), amount =
c(20,10,15))
d3Histogram(dataset = dataset)
})
output$d3Cloud <- renderd3WordCloudWidget({
dm1 <-data.frame(Var1 = c('Apple','Banana','Orange'), Freq = c(20,10,15))
dm1$Var1 <- as.character(dm1$Var1)
d3WordCloudWidget(dm1$Var1, dm1$Freq)
})
})
# Run the application
shinyApp(ui = ui, server = server)When testing my reproducible example, please comment any one of the output in the ui section d3HistogramOutput or d3WordCloudWidgetOutput and you can see that only one of the widget works at a same time.
Any help would be very much appreciated!
Thanks!
Radhikesh
--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/4af2b245-75f0-4f23-b84c-8d7875ce4a3c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.