2016-11-08 6 views
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")) 


       ) 


    )) 
) 

enter image description here

+0

'tabBox'の幅を小さくしてみてください。 'tabBox'の幅が大きすぎてダッシュボード本体に収まらないようです。 – SBista

+0

ちょっと@SBista!私はそれをやろうとしましたが、何らかの理由でわかりませんが、ui.Rの値を変更していても、アプリケーションの幅は変わりません。なぜなのかご存知ですか?ありがとう! –

答えて

0

幅を変更する

library(shinydashboard) 

ui <- dashboardPage(

    dashboardHeader(title="Deteccao de arvores individuais de LiDAR em Shiny App - R", titleWidth = 800), 
    dashboardSidebar(tags$style(HTML(".main-sidebar{width: 200px;}")), 
        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 = "500px", 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")) 


    ) 


    )) 
) 

はそれが役に立てば幸いトリックを行います!

関連する問題