如何将该仪表板标题的标题更改为以下内容:
我想说的是Basic DASHBOARD ,其中DASHBOARD为粗体,RED FONT和Basic为默认白色字体-我也想将DASHBOARD的字体大小调整为更大?关于如何在闪亮的仪表板标题中执行此操作的任何想法?
因此对于DASHBOARD或更高版本,基本上需要设为红色和粗体,BASIC保持不变,
下面的代码
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = "Basic dashboard"),
dashboardSidebar(),
dashboardBody(
# Boxes need to be put in a row (or column)
fluidRow(
box(plotOutput("plot1", height = 250)),
box(
title = "Controls",
sliderInput("slider", "Number of observations:", 1, 100, 50)
)
)
)
)
server <- function(input, output) {
set.seed(122)
histdata <- rnorm(500)
output$plot1 <- renderPlot({
data <- histdata[seq_len(input$slider)]
hist(data)
})
}
shinyApp(ui, server)
答案 0 :(得分:1)
您可以使用内联css
来实现:
dashboardHeader(title = span("Basic ",
span("dashboard",
style = "color: red; font-size: 28px")))