【发布时间】:2020-02-12 09:15:25
【问题描述】:
有没有办法在infoBox 在shinydashboard 上使用自定义图标。我正在尝试使用hrbrmstr gist 上的示例,但我找不到更新infoBox 函数的地方。
library(shiny)
ui <- dashboardPage(
dashboardHeader(title = "Dynamic boxes"),
dashboardSidebar(),
dashboardBody(
fluidRow(
box(width = 2, actionButton("count", "Count")),
infoBoxOutput("ibox"),
valueBoxOutput("vbox")
)
)
)
server <- function(input, output) {
output$ibox <- renderInfoBox({
infoBox(
"Title",
input$count,
#icon = icon("credit-card")
icon=icon(list(src=x, width="80px"), lib="local")
)
})
output$vbox <- renderValueBox({
valueBox(
"Title",
input$count,
icon = icon("credit-card")
)
})
}
shinyApp(ui, server)
【问题讨论】:
标签: r shiny shinydashboard flexdashboard