这是我上一个问题的延伸.现在我无法扩展主面板的高度.
这是我的代码
library(shiny)
library(shinydashboard)
library(shinyBS)
library(DT)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(
sidebarPanel(
textInput("text", "Enter Id:"),
box(width = 1, background = 'purple'),
actionButton("Ok", "Press Ok",style='padding:8px; font-size:100%')
)
),
dashboardBody(
mainPanel(width = 12,
tabsetPanel(
tabPanel("About", value=1, h6("The objective is to test width of ShinyApp in tabPanel design", br(),
br(),
"Distribution Prototype"
)
),
tabPanel("Data", value=2,
fluidRow(
valueBoxOutput("vbox1", width = 2),
valueBoxOutput("vbox2", width = 2),
valueBoxOutput("vbox3", width = 2),
valueBoxOutput("vbox4", width = 2),
valueBoxOutput("vbox5", width = 2),
valueBoxOutput("vbox6", width = 2) …Run Code Online (Sandbox Code Playgroud) 我正在开发具有7或8 valueBox的测试ShinyApp。一切正常,除了,闪亮的每行添加三个valueBox。现在,我在顶部有三行显示这7个valueBox。我尝试更改width参数,但它不起作用。这是我的下面的代码。
我的目标是每行有5个valueBox而不是默认的3个。任何建议深表感谢。
## Only run this example in interactive R sessions
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = "Dynamic boxes"),
dashboardSidebar(),
dashboardBody(
fluidRow(
valueBoxOutput("vbox1"),
valueBoxOutput("vbox2"),
valueBoxOutput("vbox3"),
valueBoxOutput("vbox4"),
valueBoxOutput("vbox5"),
valueBoxOutput("vbox6"),
valueBoxOutput("vbox7"),
valueBoxOutput("vbox8")
)
)
)
server <- function(input, output) {
output$vbox1 <- renderValueBox({ valueBox( "One","Yes", width = 2, icon = icon("stethoscope"))})
output$vbox2 <- renderValueBox({ valueBox( "Two","Yes", width = 2, icon = icon("stethoscope"))})
output$vbox3 <- renderValueBox({ valueBox( "Skip","Yes", width = 2, icon = icon("stethoscope"))})
output$vbox4 <- renderValueBox({ valueBox( "a Two","Yes", width …Run Code Online (Sandbox Code Playgroud)