如何在闪亮的仪表板上制作信息按钮

zes*_*sla 4 r shiny shinydashboard

我想在我的闪亮应用程序中显示一个信息按钮,用户可以单击该按钮,然后弹出一个文本(信息)框,其中包含一些文本。这是为了让用户单击按钮来获取有关我的闪亮应用程序某些部分的一般描述。

由于某种原因,我无法在闪亮或闪亮的仪表板中找到它用于此目的。有谁知道我怎样才能制作按钮?谢谢。

Por*_*hop 6

有一个简洁的包被构建rintrojs,它使您能够描述闪亮应用程序的操作,您可以将任何对象包装到其中。更多示例可以在这里找到https://github.com/carlganz/rintrojs

library(shiny)
library(rintrojs)

ui <- fluidPage(
    introjsUI(),
    column(2,
           br(),
           actionButton("help", "About this Page")
    ),
    column(2,
           introBox(
               selectInput("Task", label = "Select Task",choices =  c("Please select","Upload","Analyze Data")),
               data.step = 1,data.intro = "This is the selectInput called Task, you do xyz with this"
           )
    ),
    column(2,
           introBox(
               selectInput(
                   "breaks", "Breaks",
                   c("Sturges",
                     "Scott",
                     "Freedman-Diaconis",
                     "[Custom]" = "custom")),
               data.step = 2,data.intro = "This is the selectInput called breaks, you do xyz with this"
           )
    ),
    column(2,
           introBox(
               sliderInput("breakCount", "Break Count", min=1, max=1000, value=10),
               data.step = 3,data.intro = "This is the sliderInput called breakCount, you do xyz with this"
           )
    )
)


# Define server logic required to draw a histogram
server <- function(input, output,session) {
    observeEvent(input$help,
                 introjs(session, options = list("showBullets"="false", "showProgress"="true", 
                                                 "showStepNumbers"="false","nextLabel"="Next","prevLabel"="Prev","skipLabel"="Skip"))
    )

}

# Run the application 
shinyApp(ui = ui, server = server)
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述