1
我正在努力重新定位儀表板的原因,因爲我在附圖中顯示,它正在切割tabBox標題的一部分。我試圖使用side = "right"
,也tags$style(HTML(".tab-content{width:300px}"))
和更改width = "n values"
,但它不需要任何更改。有誰知道如何解決這個問題?我真的很感激!如何存儲tabBox的標題?
ui <- dashboardPage(
dashboardHeader(title="Deteccao de arvores individuais de LiDAR em Shiny App - R", titleWidth = 800),
dashboardSidebar(tags$style(HTML(".main-sidebar{width: 300px;}")),
sidebarMenu(
menuItem("Defina seus parametros e preferencias", icon =icon("dashboard"))),
conditionalPanel(
fileInput('layer', 'Select the CHM.asc file', multiple=FALSE, accept='asc', width = "350px"),
selectInput("fws", "Select the size of windows to find trees", choices = c("3x3"= (fws<-3), "5x5"= (fws<-5), "7x7"= (fws<-7)), width = "350px"),
checkboxInput("checkbox", "Would you like to apply the smoothing model for canopy?", value = FALSE, width = "350px"), selectInput("sws", "Select the size of the smoothing window for trees", choices = c("3x3" = (sws<-3), "5x5" = (sws<-5), "7x7"=(sws<-7)), width = "350px"),
checkboxInput("checkp", "Plot individual trees detected in CHM", value=FALSE, width="350px"),
checkboxInput("checkpd", "Download the shapefile (.shp) of Individual trees detected", value = FALSE, width = "350px"), uiOutput("shapefile"),
actionButton("action", "RUN!"))
),
dashboardBody(
fluidRow(
tabBox(title= tagList(shiny::icon("cogs"), "Results"), width = "200px", height = "600px", side = "right",
tabPanel("Visualization of CHM", plotOutput("mapPlot")),
tabPanel("Trees detected from rLiDAR", tableOutput("arvlist"), downloadButton("downList", "Download Tree List")),
tabPanel("Summary of LiDAR metrics", tableOutput("sumy"), downloadButton("downSumy", "Download Summary of LiDAR metrics")),
tabPanel("Profile of height model", plotOutput("hist"), downloadButton("downHist", "Download Height's Histogram of Density")), #histograma de densidade
tabPanel("Individual trees detected - Model 2D of CHM", plotOutput("plotTrees"), downloadButton("downDetec", "Download CHM of Trees Detected"))
)
))
)
嘗試減小'tabBox'的寬度。它看起來像'tabBox'的寬度太大而不適合儀表板主體。 – SBista
嘿@SBista!我試圖做到這一點,但似乎出於某種原因,我不知道,即使在修改ui.R中的值時,寬度在應用程序中也不會改變。你知道爲什麼嗎?謝謝! –