【问题标题】:Shiny App - Build an interactive help for the userShiny App - 为用户构建交互式帮助
【发布时间】:2018-12-26 13:28:53
【问题描述】:

我正在学习(主要是为了好玩)闪亮,我正在构建一个包含一些表格数据和 ggplot 图表的仪表板。

我想知道是否有可能为应用程序用户实现一种交互式帮助,即用户将鼠标指针放在某个图形上,它会弹出该图的简要描述。当用户将鼠标指针移开时,简要说明应该会消失。

我刚刚发现了helpText() 功能,但显然与我想要实现的功能相去甚远。

我可以补充一点,我不懂任何 JS,我知道 html 和 css 的基础知识(非常基础)。

谢谢

【问题讨论】:

    标签: r shiny


    【解决方案1】:

    有一个很棒的rintrojs 包可以满足你的需求,这里是一个小例子:

    library(rintrojs)
    library(shiny)
    
    ui <- fluidPage(
      introjsUI(),
      actionButton("help", "About this Page"),
      sidebarPanel(
        introBox(sliderInput("Slider", "Slider",min = 1, max = 10, value = 5,step = 1),data.step = 1,data.intro = "This is slider its doing xyz"),
        introBox(actionButton("Button","Button"),data.step = 2,data.intro = "This is Button its doing other things"))
    )
    
    server <- function(input, output, session){
      observeEvent(input$help,introjs(session, options = list("showBullets"="false", "showProgress"="true", "showStepNumbers"="false","nextLabel"="Next","prevLabel"="Prev","skipLabel"="Skip")))
    }
    
    shinyApp(ui, server)
    

    【讨论】:

    • 谢谢。。不知道为什么没看到。
    猜你喜欢
    • 2018-07-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-31
    • 1970-01-01
    • 1970-01-01
    • 2022-12-01
    • 1970-01-01
    相关资源
    最近更新 更多