使用 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 提供預設介面外觀(skins)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 建立儀表板