使用 shinydashboard 构建仪表板
Png Kee Seng
Researcher

status 属性status 参数设置状态<object>(status = <status>, ...)

notificationItem() 的默认状态为 "success"
header <- dashboardHeader( ... dropdownMenu(type = "notifications",notificationItem("Sell alert",status = "danger"),notificationItem("Buy alert",status = "success"))) ...
status 时,盒子无颜色status 设为 "info"solidHeader = TRUE... body <- dashboardBody(..., box("Stock name",title="Stock name title",width = 6,status = "info",solidHeader = TRUE)),...



colorclose 价较昨日下跌 2%valueBox() 以提醒 Sally
... body <- dashboardBody(...,valueBox("Close (%)", "-2%", width = 2,color = "red"),...) ...

?validStatuses 与 ?validColors 查看可用状态与颜色shinydashboard 内置多种皮肤dashboardPage() 的 skin 参数中设置dashboardPage(skin = <color>)
可选颜色
"blue"(默认)"black""purple""green""red""yellow"ui <- dashboardPage(skin = "purple",
header, sidebar, body)
ui <- dashboardPage(skin = "black",
header, sidebar, body)


使用 shinydashboard 构建仪表板