如何解决闪亮的仪表板框中的中心标题
我正在为应用程序使用闪亮的仪表板,但找不到将标题居中的方法:
Box(title = "Labels",status = "primary",solidHeader = T...
解决方法
为您提供一些选择...
library(shiny)
library(shinydashboard)
ui <- shinyUI(dashboardPage(
dashboardHeader(title = "Test App"),dashboardSidebar(
selectInput("dt","Data",choices = list("cars","mtcars","pressure") )
),## BODY
dashboardBody(
fluidRow(
column(
width = 10,box(title = h1("My Title with h1 ",align="center"),solidHeader = T,width = 5,height = 500,collapsible = T,plotOutput("plot1",height=350)
),box(title = h6("My Title with h6 ",plotOutput("plot2")
))),br(),fluidRow(
column(width = 8,align="center",box(title = div("My Title with div,red color and font-size 22 ",style='color:red; font-size:22px;'),width = 8,plotOutput("plot3")
) )
)
)))
server <- shinyServer(function(input,output) {
output$plot1 <- renderPlot({
req(input$dt)
plot(get(input$dt))
})
output$plot2 <- renderPlot({plot(mtcars)})
output$plot3 <- renderPlot({plot(pressure)})
})
shinyApp(ui = ui,server = server)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。