2017-05-01 54 views
0

我想在我閃亮的應用程序中打開一個彈出窗口,以便我可以在彈出窗口中繪製我的圖表。所有的操作按鈕應該打開點擊彈出。如何在閃亮的應用程序中點擊彈出窗口打開

ui.r

library(shiny) 

shinyUI(fluidPage(



    fluidRow(align="center", 

      column(8, align="center", offset = 2, 

        textInput("prod_code", label=h3("ANALYTICS"), value = ""), 

        tags$style(type="text/css", "#string { height: 50; width: 100%; text-align:center; font-size: 30;}"), 
        tags$style(type="text/css", "#plot1_dl { width:100; vertical-align:50%}"), 



        actionButton("Twitter_Sentiment_analysis","Twitter Sentiment analysis"), 
        actionButton("Twitter_wordcloud","Twitter WordCloud"), 
        actionButton("Twitter_Heatmap","Twitter Heatmap"), 
        actionButton("Ecommerce_Sentiment","Ecommerce Sentiment"), 
        actionButton("Ecommerce_Reviews","Ecommerce Reviews"), 




        textOutput("userenteredquery") 



      ) 

) 

) 

) 

回答

0

您可以conditionalPanel,在那裏你將條件設置爲點擊次數對您的操作按鈕做到這一點。例如

conditionalPanel(
    condition = "input.Twitter_Sentiment_analysis % 2 == 1", 
    absolutePanel(
    left = 10, 
    top = 10, 
    width = 800, 
    plotOutput("Twitter_Sentiment_analysis_plot") 
) 
) 

另一種方法是使用shinyBS::bsModal它給你一個很好的用戶界面,但需要另一個包。

+0

你確定打開了一個彈出窗口嗎? – BigDataScientist

相關問題