My problem is that I told shiny to take all the line (12 columns) to print c7 box but it only uses half of it. Can anyone figure out what is the problem? Following is my code:
library(shinydashboard)
library(shiny)
library(readr)
library(rsconnect)
header=dashboardHeader(title="App")
sidebar=dashboardSidebar(sidebarMenu(
menuItem("Stack", tabName = "a", icon = icon("dashboard"))))
c7=column(12,box(title="Prediction Box",status="warning",solidHeader=FALSE,
textInput("text", label = h3("Write something :"), value = ""),actionButton("do","Go")))
body=dashboardBody(tabItems(tabItem(tabName="a",fluidRow(c7))))
ui <- dashboardPage(header,sidebar,body)
server <- function(input, output){
}
shinyApp(ui,server)
By default, if you're not specifying the width of the box
it will be set to 6
. Have a look at ?box
library(shinydashboard)
library(shiny)
header=dashboardHeader(title="App")
sidebar=dashboardSidebar(sidebarMenu(menuItem("Stack", tabName = "a", icon = icon("dashboard"))))
?box
c7=column(12,box(width=12,title="Prediction Box",status="warning",solidHeader=FALSE,
textInput("text", label = h3("Write something :"), value = ""),actionButton("do","Go")))
body=dashboardBody(tabItems(tabItem(tabName="a",fluidRow(c7))))
ui <- dashboardPage(header,sidebar,body)
server <- function(input, output){
}
shinyApp(ui,server)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.